- java.lang.Object
-
- io.netty5.buffer.api.BufferHolder<WebSocketFrame>
-
- io.netty5.handler.codec.http.websocketx.WebSocketFrame
-
- All Implemented Interfaces:
Resource<WebSocketFrame>
,AutoCloseable
- Direct Known Subclasses:
BinaryWebSocketFrame
,CloseWebSocketFrame
,ContinuationWebSocketFrame
,PingWebSocketFrame
,PongWebSocketFrame
,TextWebSocketFrame
public abstract class WebSocketFrame extends BufferHolder<WebSocketFrame>
Base class for web socket frames.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WebSocketFrame(boolean finalFragment, int rsv, Buffer binaryData)
protected
WebSocketFrame(Buffer binaryData)
protected
WebSocketFrame(WebSocketFrame copyFrom, Buffer binaryData)
This is a copy-constructor, used by sub-classes to implementResource.send()
.protected
WebSocketFrame(Send<Buffer> binaryData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Buffer
binaryData()
boolean
isFinalFragment()
Flag to indicate if this frame is the final fragment in a message.int
rsv()
Bits used for extensions to the standard.String
toString()
-
Methods inherited from class io.netty5.buffer.api.BufferHolder
close, equals, getBuffer, getBufferVolatile, hashCode, isAccessible, receive, replaceBuffer, replaceBufferVolatile, send, touch
-
-
-
-
Constructor Detail
-
WebSocketFrame
protected WebSocketFrame(Buffer binaryData)
-
WebSocketFrame
protected WebSocketFrame(boolean finalFragment, int rsv, Buffer binaryData)
-
WebSocketFrame
protected WebSocketFrame(WebSocketFrame copyFrom, Buffer binaryData)
This is a copy-constructor, used by sub-classes to implementResource.send()
. The life cycle of thebinaryData
buffer is not manipulated by this constructor, but instead stored as-is.- Parameters:
copyFrom
- The original frame instance to copy from.binaryData
- The binary data of the original frame.
-
-
Method Detail
-
isFinalFragment
public boolean isFinalFragment()
Flag to indicate if this frame is the final fragment in a message. The first fragment (frame) may also be the final fragment.
-
rsv
public int rsv()
Bits used for extensions to the standard.
-
binaryData
public Buffer binaryData()
-
-