Interface WebSocketMessage<T>
- Type Parameters:
T- the payload type
- All Known Implementing Classes:
AbstractWebSocketMessage, BinaryMessage, PingMessage, PongMessage, TextMessage
public interface WebSocketMessage<T>
A message that can be handled or sent on a WebSocket connection.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionReturn the message payload (nevernull).intReturn the number of bytes contained in the message.booleanisLast()When partial message support is available and requested viaWebSocketHandler.supportsPartialMessages(), this method returnstrueif the current message is the last part of the complete WebSocket message sent by the client.
-
Method Details
-
getPayload
T getPayload()Return the message payload (nevernull). -
getPayloadLength
int getPayloadLength()Return the number of bytes contained in the message. -
isLast
boolean isLast()When partial message support is available and requested viaWebSocketHandler.supportsPartialMessages(), this method returnstrueif the current message is the last part of the complete WebSocket message sent by the client. Otherwisefalseis returned if partial message support is either not available or not enabled.
-