Interface Frame
- All Known Implementing Classes:
JettyWebSocketFrame
public interface Frame
An immutable websocket frame.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final record
static enum
-
Method Summary
Modifier and TypeMethodDescriptiondefault Frame.CloseStatus
byte
The effective opcode of the frame accounting for the CONTINUATION opcode.byte[]
getMask()
byte
int
The original payload length (Buffer.remaining()
)getType()
boolean
boolean
isFin()
boolean
isMasked()
boolean
isRsv1()
boolean
isRsv2()
boolean
isRsv3()
-
Method Details
-
getMask
byte[] getMask() -
getOpCode
byte getOpCode() -
getPayload
ByteBuffer getPayload() -
getPayloadLength
int getPayloadLength()The original payload length (Buffer.remaining()
)- Returns:
- the original payload length (
Buffer.remaining()
)
-
getType
Frame.Type getType() -
hasPayload
boolean hasPayload() -
isFin
boolean isFin() -
isMasked
boolean isMasked() -
isRsv1
boolean isRsv1() -
isRsv2
boolean isRsv2() -
isRsv3
boolean isRsv3() -
getCloseStatus
-
getEffectiveOpCode
byte getEffectiveOpCode()The effective opcode of the frame accounting for the CONTINUATION opcode. If the frame is a CONTINUATION frame for a TEXT message, this will return TEXT. If the frame is a CONTINUATION frame for a BINARY message, this will return BINARY. Otherwise, this will return the same opcode as the frame.- Returns:
- the effective opcode of the frame.
-