Package org.glassfish.tyrus.core.frame
Class TextFrame
java.lang.Object
org.glassfish.tyrus.core.frame.Frame
org.glassfish.tyrus.core.frame.TyrusFrame
org.glassfish.tyrus.core.frame.TextFrame
Text frame representation.
- Author:
- Pavel Bucek
-
Nested Class Summary
Nested classes/interfaces inherited from class org.glassfish.tyrus.core.frame.TyrusFrame
TyrusFrame.FrameTypeNested classes/interfaces inherited from class org.glassfish.tyrus.core.frame.Frame
Frame.Builder -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.TextFrame(Frame frame, ByteBuffer remainder) Constructor.TextFrame(Frame frame, ByteBuffer remainder, boolean continuation) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionRemainder after UTF-8 decoding.Get text payload.voidrespond(TyrusWebSocket socket) Execution part of frame processing.toString()Methods inherited from class org.glassfish.tyrus.core.frame.TyrusFrame
getFrameType, wrapMethods inherited from class org.glassfish.tyrus.core.frame.Frame
builder, builder, getMaskingKey, getOpcode, getPayloadData, getPayloadLength, isControlFrame, isFin, isMask, isRsv1, isRsv2, isRsv3
-
Constructor Details
-
TextFrame
Constructor.- Parameters:
frame- original (text) frame.remainder- UTF-8 decoding remainder from previously processed frame.
-
TextFrame
Constructor.- Parameters:
frame- original (text) frame.remainder- UTF-8 decoding remainder from previously processed frame.continuation-truewhen this frame is continuation frame,falseotherwise.
-
TextFrame
Constructor.- Parameters:
message- text message (will be encoded using strict UTF-8 encoding).continuation-truewhen this frame is continuation frame,falseotherwise.fin-truewhen this frame is last in current partial message batch. Standard (non-continuous) frames have this bit set totrue.
-
-
Method Details
-
getTextPayload
Get text payload.- Returns:
- text payload.
-
getRemainder
Remainder after UTF-8 decoding.This might be removed in the future, if encoding part will be separated from text frame impl.
- Returns:
- UTF-8 decoding remainder. Used internally to decoding next incoming frame.
-
respond
Description copied from class:TyrusFrameExecution part of frame processing.- Specified by:
respondin classTyrusFrame- Parameters:
socket- socket on which the appropriate action will be performed.
-
toString
-