Package org.springframework.web.socket
Class PingMessage
java.lang.Object
org.springframework.web.socket.AbstractWebSocketMessage<ByteBuffer>
org.springframework.web.socket.PingMessage
- All Implemented Interfaces:
- WebSocketMessage<ByteBuffer>
A WebSocket ping message.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new ping message with an empty payload.PingMessage(ByteBuffer payload) Create a new ping message with the given ByteBuffer payload.
- 
Method SummaryModifier and TypeMethodDescriptionintReturn the number of bytes contained in the message.protected StringMethods inherited from class org.springframework.web.socket.AbstractWebSocketMessageequals, getPayload, hashCode, isLast, toString
- 
Constructor Details- 
PingMessagepublic PingMessage()Create a new ping message with an empty payload.
- 
PingMessageCreate a new ping message with the given ByteBuffer payload.- Parameters:
- payload- the non-null payload
 
 
- 
- 
Method Details- 
getPayloadLengthpublic int getPayloadLength()Description copied from interface:WebSocketMessageReturn the number of bytes contained in the message.
- 
toStringPayload- Specified by:
- toStringPayloadin class- AbstractWebSocketMessage<ByteBuffer>
 
 
-