public final class TextMessage extends AbstractWebSocketMessage<String>
Constructor and Description |
---|
TextMessage(CharSequence payload)
Create a new text WebSocket message from the given CharSequence payload.
|
TextMessage(CharSequence payload,
boolean isLast)
Create a new text WebSocket message with the given payload representing the
full or partial message content.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getPayloadSize() |
protected String |
toStringPayload() |
equals, getPayload, hashCode, isLast, toString
public TextMessage(CharSequence payload)
payload
- the non-null payloadpublic TextMessage(CharSequence payload, boolean isLast)
isLast
boolean flag is set
to false
the message is sent as partial content and more partial
messages will be expected until the boolean flag is set to true
.payload
- the non-null payloadisLast
- whether this the last part of a series of partial messagesprotected int getPayloadSize()
getPayloadSize
in class AbstractWebSocketMessage<String>
protected String toStringPayload()
toStringPayload
in class AbstractWebSocketMessage<String>