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.FrameType
Nested classes/interfaces inherited from class org.glassfish.tyrus.core.frame.Frame
Frame.Builder
-
Constructor Summary
ConstructorDescriptionConstructor.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.void
respond
(TyrusWebSocket socket) Execution part of frame processing.toString()
Methods inherited from class org.glassfish.tyrus.core.frame.TyrusFrame
getFrameType, wrap
Methods 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
-true
when this frame is continuation frame,false
otherwise.
-
TextFrame
Constructor.- Parameters:
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 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:TyrusFrame
Execution part of frame processing.- Specified by:
respond
in classTyrusFrame
- Parameters:
socket
- socket on which the appropriate action will be performed.
-
toString
-