Package org.glassfish.tyrus.core.frame
Class TyrusFrame
java.lang.Object
org.glassfish.tyrus.core.frame.Frame
org.glassfish.tyrus.core.frame.TyrusFrame
- Direct Known Subclasses:
BinaryFrame
,CloseFrame
,PingFrame
,PongFrame
,TextFrame
Frame representation used in Tyrus runtime.
Enriched Frame
representation.
- Author:
- Pavel Bucek
-
Nested Class Summary
Nested classes/interfaces inherited from class org.glassfish.tyrus.core.frame.Frame
Frame.Builder
-
Constructor Summary
ModifierConstructorDescriptionprotected
TyrusFrame
(Frame frame, TyrusFrame.FrameType frameType) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of the frame.abstract void
respond
(TyrusWebSocket socket) Execution part of frame processing.static TyrusFrame
wrap
(Frame frame, byte inFragmentedType, ByteBuffer remainder) TyrusFrame
factory method.Methods inherited from class org.glassfish.tyrus.core.frame.Frame
builder, builder, getMaskingKey, getOpcode, getPayloadData, getPayloadLength, isControlFrame, isFin, isMask, isRsv1, isRsv2, isRsv3, toString
-
Constructor Details
-
TyrusFrame
Constructor.- Parameters:
frame
- enriched frame.frameType
- type of the frame.
-
-
Method Details
-
respond
Execution part of frame processing.- Parameters:
socket
- socket on which the appropriate action will be performed.
-
getFrameType
Returns the type of the frame. It is used for distinguishing frame types in monitoring.TODO: consider moving this to "MonitoredFrame" or something like this;
- Returns:
- type of the frame.
-
wrap
TyrusFrame
factory method.- Parameters:
frame
- original plain frame.inFragmentedType
- type of fragment (text or binary).remainder
- decoding remainder. Used only for partial text frames.- Returns:
- new TyrusFrame.
-