Class SockJsFrame
java.lang.Object
org.springframework.web.socket.sockjs.frame.SockJsFrame
Represents a SockJS frame. Provides factory methods to create SockJS frames.
- Since:
 - 4.0
 - Author:
 - Rossen Stoyanchev
 
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionSockJsFrame(String content) Create a new instance frame with the given frame content. - 
Method Summary
Modifier and TypeMethodDescriptionstatic SockJsFramecloseFrame(int code, @Nullable String reason) static SockJsFramestatic SockJsFramebooleanReturn the SockJS frame content (nevernull).byte[]Return the SockJS frame content as a byte array.Return data contained in a SockJS "message" and "close" frames.getType()Return the SockJS frame type.inthashCode()static SockJsFramestatic SockJsFramemessageFrame(SockJsMessageCodec codec, String... messages) static SockJsFrametoString() 
- 
Field Details
- 
CHARSET
The charset used by SockJS. 
 - 
 - 
Constructor Details
- 
SockJsFrame
Create a new instance frame with the given frame content.- Parameters:
 content- the content (must be a non-empty and represent a valid SockJS frame)
 
 - 
 - 
Method Details
- 
getType
Return the SockJS frame type. - 
getContent
Return the SockJS frame content (nevernull). - 
getContentBytes
public byte[] getContentBytes()Return the SockJS frame content as a byte array. - 
getFrameData
 - 
equals
 - 
hashCode
 - 
toString
 - 
openFrame
 - 
heartbeatFrame
 - 
messageFrame
 - 
closeFrameGoAway
 - 
closeFrameAnotherConnectionOpen
 - 
closeFrame
 
 -