Class Jackson2SockJsMessageCodec
java.lang.Object
org.springframework.web.socket.sockjs.frame.AbstractSockJsMessageCodec
org.springframework.web.socket.sockjs.frame.Jackson2SockJsMessageCodec
- All Implemented Interfaces:
 SockJsMessageCodec
A Jackson 2.x codec for encoding and decoding SockJS messages.
 
It customizes Jackson's default properties with the following ones:
MapperFeature.DEFAULT_VIEW_INCLUSIONis disabledDeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIESis disabled
Note that Jackson's JSR-310 and Joda-Time support modules will be registered automatically when available (and when Java 8 and Joda-Time themselves are available, respectively).
- Since:
 - 4.0
 - Author:
 - Rossen Stoyanchev
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected char[]applyJsonQuoting(String content) Apply standard JSON string quoting (see json.org).String[]Decode the given SockJS message frame.String[]decodeInputStream(InputStream content) Decode the given SockJS message frame.Methods inherited from class org.springframework.web.socket.sockjs.frame.AbstractSockJsMessageCodec
encode 
- 
Constructor Details
- 
Jackson2SockJsMessageCodec
public Jackson2SockJsMessageCodec() - 
Jackson2SockJsMessageCodec
 
 - 
 - 
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 - Throws:
 IOException- if the content could not be parsed
 - 
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 - Throws:
 IOException- if the content could not be parsed
 - 
applyJsonQuoting
Description copied from class:AbstractSockJsMessageCodecApply standard JSON string quoting (see json.org).- Specified by:
 applyJsonQuotingin classAbstractSockJsMessageCodec
 
 -