Class JacksonJsonsockJsMessageCodec
java.lang.Object
org.springframework.web.socket.sockjs.frame.AbstractsockJsMessageCodec
org.springframework.web.socket.sockjs.frame.JacksonJsonsockJsMessageCodec
- All Implemented Interfaces:
sockJsMessageCodec
A Jackson 3.x codec for encoding and decoding sockJs messages.
- since:
- 7.0
- Author:
- sebastien Deleuze
-
Constructor summary
ConstructorsConstructorDescriptionConstruct a new instance with aJsonMappercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).JacksonJsonsockJsMessageCodec(tools.jackson.databind.json.JsonMapper mapper) Construct a new instance with the providedJsonMapper.JacksonJsonsockJsMessageCodec(tools.jackson.databind.json.JsonMapper.Builder builder) Construct a new instance with the providedJsonMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader). -
Method summary
Modifier and TypeMethodDescriptionprotected char[]applyJsonQuoting(string content) Apply standard JsON string quoting (see json.org).Decode the given sockJs message frame.decodeInputstream(Inputstream content) Decode the given sockJs message frame.Methods inherited from class AbstractsockJsMessageCodec
encode
-
Constructor Details
-
JacksonJsonsockJsMessageCodec
public JacksonJsonsockJsMessageCodec()Construct a new instance with aJsonMappercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).- see Also:
-
JacksonJsonsockJsMessageCodec
public JacksonJsonsockJsMessageCodec(tools.jackson.databind.json.JsonMapper.Builder builder) Construct a new instance with the providedJsonMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).- see Also:
-
JacksonJsonsockJsMessageCodec
public JacksonJsonsockJsMessageCodec(tools.jackson.databind.json.JsonMapper mapper) Construct a new instance with the providedJsonMapper.- see Also:
-
-
Method Details
-
decode
Description copied from interface: sockJsMessageCodecDecode the given sockJs message frame.- Parameters:
content- the sockJs message frame- Returns:
- an array of messages, or
nullif none
-
decodeInputstream
Description copied from interface: sockJsMessageCodecDecode the given sockJs message frame.- Parameters:
content- the sockJs message frame- Returns:
- an array of messages, or
nullif none
-
applyJsonQuoting
Description copied from class: AbstractsockJsMessageCodecApply standard JsON string quoting (see json.org).- specified by:
applyJsonQuoting in class AbstractsockJsMessageCodec
-