public class TextFrame extends TyrusFrame
TyrusFrame.FrameType
Frame.Builder
Constructor and Description |
---|
TextFrame(Frame frame,
java.nio.ByteBuffer remainder)
Constructor.
|
TextFrame(Frame frame,
java.nio.ByteBuffer remainder,
boolean continuation)
Constructor.
|
TextFrame(java.lang.String message,
boolean continuation,
boolean fin)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
getRemainder()
Remainder after UTF-8 decoding.
|
java.lang.String |
getTextPayload()
Get text payload.
|
void |
respond(TyrusWebSocket socket)
Execution part of frame processing.
|
java.lang.String |
toString() |
getFrameType, wrap
builder, builder, getMaskingKey, getOpcode, getPayloadData, getPayloadLength, isControlFrame, isFin, isMask, isRsv1, isRsv2, isRsv3
public TextFrame(Frame frame, java.nio.ByteBuffer remainder)
frame
- original (text) frame.remainder
- UTF-8 decoding remainder from previously processed frame.public TextFrame(Frame frame, java.nio.ByteBuffer remainder, boolean continuation)
frame
- original (text) frame.remainder
- UTF-8 decoding remainder from previously processed frame.continuation
- true
when this frame is continuation frame, false
otherwise.public TextFrame(java.lang.String message, boolean continuation, boolean fin)
message
- text message (will be encoded using strict UTF-8 encoding).continuation
- true
when this frame is continuation frame, false
otherwise.fin
- true
when this frame is last in current partial message batch. Standard
(non-continuous) frames have this bit set to true
.public java.lang.String getTextPayload()
public java.nio.ByteBuffer getRemainder()
This might be removed in the future, if encoding part will be separated from text frame impl.
public void respond(TyrusWebSocket socket)
TyrusFrame
respond
in class TyrusFrame
socket
- socket on which the appropriate action will be performed.Copyright © 2012–2020 Oracle Corporation. All rights reserved.