类 AbstractSockJsMessageCodec
- java.lang.Object
- org.springframework.web.socket.sockjs.frame.AbstractSockJsMessageCodec
- 所有已实现的接口:
SockJsMessageCodec
- 直接已知子类:
Jackson2SockJsMessageCodec
public abstract class AbstractSockJsMessageCodec extends Object implements SockJsMessageCodec
An base class for SockJS message codec that provides an implementation ofencode(String[])
.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 构造器 说明 AbstractSockJsMessageCodec()
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected abstract char[]
applyJsonQuoting(String content)
Apply standard JSON string quoting (see https://www.json.org/).String
encode(String... messages)
Encode the given messages as a SockJS message frame.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.web.socket.sockjs.frame.SockJsMessageCodec
decode, decodeInputStream
构造器详细资料
AbstractSockJsMessageCodec
public AbstractSockJsMessageCodec()
方法详细资料
encode
public String encode(String... messages)
从接口复制的说明:SockJsMessageCodec
Encode 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).- 指定者:
encode
在接口中SockJsMessageCodec
- 参数:
messages
- the messages to encode- 返回:
- the content for a SockJS message frame (never
null
)
applyJsonQuoting
protected abstract char[] applyJsonQuoting(String content)
Apply standard JSON string quoting (see https://www.json.org/).