public class TextFrame extends TyrusFrame
TyrusFrame.FrameTypeFrame.Builder| Constructor and Description |
|---|
TextFrame(Frame frame,
ByteBuffer remainder)
Constructor.
|
TextFrame(Frame frame,
ByteBuffer remainder,
boolean continuation)
Constructor.
|
TextFrame(String message,
boolean continuation,
boolean fin)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
getRemainder()
Remainder after UTF-8 decoding.
|
String |
getTextPayload()
Get text payload.
|
void |
respond(TyrusWebSocket socket)
Execution part of frame processing.
|
String |
toString() |
getFrameType, wrapbuilder, builder, getMaskingKey, getOpcode, getPayloadData, getPayloadLength, isControlFrame, isFin, isMask, isRsv1, isRsv2, isRsv3public TextFrame(Frame frame, ByteBuffer remainder)
frame - original (text) frame.remainder - UTF-8 decoding remainder from previously processed frame.public TextFrame(Frame frame, 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(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 String getTextPayload()
public ByteBuffer getRemainder()
public void respond(TyrusWebSocket socket)
TyrusFramerespond in class TyrusFramesocket - socket on which the appropriate action will be performed.Copyright © 2012-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.