public class SimpleTextMessage extends java.lang.Object implements MessageAppender
Modifier and Type | Field and Description |
---|---|
protected boolean |
finished |
private EventDriver |
onEvent |
private int |
size |
protected Utf8StringBuilder |
utf |
Constructor and Description |
---|
SimpleTextMessage(EventDriver onEvent) |
Modifier and Type | Method and Description |
---|---|
void |
appendFrame(java.nio.ByteBuffer payload,
boolean isLast)
Append the frame payload to the message.
|
void |
messageComplete()
Notification that message is to be considered complete.
|
private final EventDriver onEvent
protected final Utf8StringBuilder utf
private int size
protected boolean finished
public SimpleTextMessage(EventDriver onEvent)
public void appendFrame(java.nio.ByteBuffer payload, boolean isLast) throws java.io.IOException
MessageAppender
appendFrame
in interface MessageAppender
payload
- the frame payload to append.isLast
- flag indicating if this is the last part of the message or not.java.io.IOException
- if unable to append the frame payloadpublic void messageComplete()
MessageAppender
Any cleanup or final actions should be taken here.
messageComplete
in interface MessageAppender