Class AbstractSockJsMessageCodec
java.lang.Object
org.springframework.web.socket.sockjs.frame.AbstractSockJsMessageCodec
- All Implemented Interfaces:
- SockJsMessageCodec
- Direct Known Subclasses:
- Jackson2SockJsMessageCodec
An base class for SockJS message codec that provides an implementation of
 
encode(String[]).- Since:
- 4.0
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract char[]applyJsonQuoting(String content) Apply standard JSON string quoting (see https://www.json.org/).Encode the given messages as a SockJS message frame.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.socket.sockjs.frame.SockJsMessageCodecdecode, decodeInputStream
- 
Constructor Details- 
AbstractSockJsMessageCodecpublic AbstractSockJsMessageCodec()
 
- 
- 
Method Details- 
encodeDescription copied from interface:SockJsMessageCodecEncode the given messages as a SockJS message frame. Aside from applying standard JSON quoting to each message, there are some additional JSON Unicode escaping rules. See the "JSON Unicode Encoding" section of SockJS protocol (i.e. the protocol test suite).- Specified by:
- encodein interface- SockJsMessageCodec
- Parameters:
- messages- the messages to encode
- Returns:
- the content for a SockJS message frame (never null)
 
- 
applyJsonQuotingApply standard JSON string quoting (see https://www.json.org/).
 
-