Class WebSocketFrame
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.WebSocketFrame
-
- All Implemented Interfaces:
Frame
- Direct Known Subclasses:
ControlFrame
,DataFrame
@Deprecated(since="2021-05-27") public abstract class WebSocketFrame extends java.lang.Object implements Frame
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.A Base Frame as seen in RFC 6455. Sec 5.20 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-------+-+-------------+-------------------------------+ |F|R|R|R| opcode|M| Payload len | Extended payload length | |I|S|S|S| (4) |A| (7) | (16/64) | |N|V|V|V| |S| | (if payload len==126/127) | | |1|2|3| |K| | | +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + | Extended payload length continued, if payload len == 127 | + - - - - - - - - - - - - - - - +-------------------------------+ | |Masking-key, if MASK set to 1 | +-------------------------------+-------------------------------+ | Masking-key (continued) | Payload Data | +-------------------------------- - - - - - - - - - - - - - - - + : Payload Data continued ... : + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | Payload Data continued ... | +---------------------------------------------------------------+
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.websocket.api.extensions.Frame
Frame.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract void
assertValid()
Deprecated.static WebSocketFrame
copy(Frame original)
Deprecated.boolean
equals(java.lang.Object obj)
Deprecated.byte[]
getMask()
Deprecated.byte
getOpCode()
Deprecated.java.nio.ByteBuffer
getPayload()
Deprecated.Get the payload ByteBuffer.java.lang.String
getPayloadAsUTF8()
Deprecated.int
getPayloadLength()
Deprecated.The original payload length (Buffer.remaining()
)Frame.Type
getType()
Deprecated.int
hashCode()
Deprecated.boolean
hasPayload()
Deprecated.abstract boolean
isControlFrame()
Deprecated.abstract boolean
isDataFrame()
Deprecated.boolean
isFin()
Deprecated.boolean
isLast()
Deprecated.Same asFrame.isFin()
boolean
isMasked()
Deprecated.boolean
isRsv1()
Deprecated.boolean
isRsv2()
Deprecated.boolean
isRsv3()
Deprecated.void
reset()
Deprecated.WebSocketFrame
setFin(boolean fin)
Deprecated.Frame
setMask(byte[] maskingKey)
Deprecated.Frame
setMasked(boolean mask)
Deprecated.WebSocketFrame
setPayload(java.nio.ByteBuffer buf)
Deprecated.Set the data payload.WebSocketFrame
setRsv1(boolean rsv1)
Deprecated.WebSocketFrame
setRsv2(boolean rsv2)
Deprecated.WebSocketFrame
setRsv3(boolean rsv3)
Deprecated.java.lang.String
toString()
Deprecated.
-
-
-
Method Detail
-
copy
public static WebSocketFrame copy(Frame original)
Deprecated.
-
assertValid
public abstract void assertValid()
Deprecated.
-
equals
public boolean equals(java.lang.Object obj)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
getPayload
public java.nio.ByteBuffer getPayload()
Deprecated.Get the payload ByteBuffer. possible null.- Specified by:
getPayload
in interfaceFrame
-
getPayloadAsUTF8
public java.lang.String getPayloadAsUTF8()
Deprecated.
-
getPayloadLength
public int getPayloadLength()
Deprecated.Description copied from interface:Frame
The original payload length (Buffer.remaining()
)- Specified by:
getPayloadLength
in interfaceFrame
- Returns:
- the original payload length (
Buffer.remaining()
)
-
getType
public Frame.Type getType()
Deprecated.
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
hasPayload
public boolean hasPayload()
Deprecated.- Specified by:
hasPayload
in interfaceFrame
-
isControlFrame
public abstract boolean isControlFrame()
Deprecated.
-
isDataFrame
public abstract boolean isDataFrame()
Deprecated.
-
isLast
public boolean isLast()
Deprecated.Description copied from interface:Frame
Same asFrame.isFin()
-
reset
public void reset()
Deprecated.
-
setFin
public WebSocketFrame setFin(boolean fin)
Deprecated.
-
setMask
public Frame setMask(byte[] maskingKey)
Deprecated.
-
setMasked
public Frame setMasked(boolean mask)
Deprecated.
-
setPayload
public WebSocketFrame setPayload(java.nio.ByteBuffer buf)
Deprecated.Set the data payload.The provided buffer will be used as is, no copying of bytes performed.
The provided buffer should be flipped and ready to READ from.
- Parameters:
buf
- the bytebuffer to set- Returns:
- the frame itself
-
setRsv1
public WebSocketFrame setRsv1(boolean rsv1)
Deprecated.
-
setRsv2
public WebSocketFrame setRsv2(boolean rsv2)
Deprecated.
-
setRsv3
public WebSocketFrame setRsv3(boolean rsv3)
Deprecated.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-