Top Description Fields Constructors Methods
io.netty5.handler.codec.http.websocketx

public abstract Class WebSocketFrame

extends BufferHolder<WebSocketFrame>
Class Inheritance
Known Direct Subclasses
io.netty5.handler.codec.http.websocketx.BinaryWebSocketFrame, io.netty5.handler.codec.http.websocketx.CloseWebSocketFrame, io.netty5.handler.codec.http.websocketx.ContinuationWebSocketFrame, io.netty5.handler.codec.http.websocketx.PingWebSocketFrame, io.netty5.handler.codec.http.websocketx.PongWebSocketFrame, io.netty5.handler.codec.http.websocketx.TextWebSocketFrame
Imports
io.netty5.buffer.Buffer, .BufferHolder, io.netty5.util.Resource, .Send, io.netty5.util.internal.StringUtil

Base class for web socket frames.

Field Summary

Modifier and TypeField and Description
private final boolean
finalFragment

Flag to indicate if this frame is the final fragment in a message.

private final int
rsv

RSV1, RSV2, RSV3 used for extensions

Constructor Summary

AccessConstructor and Description
protected
WebSocketFrame(Buffer binaryData)

protected
WebSocketFrame(Send<Buffer> binaryData)

protected
WebSocketFrame(boolean finalFragment, int rsv, Buffer binaryData)

protected
WebSocketFrame(WebSocketFrame
The original frame instance to copy from.
copyFrom
,
Buffer
The binary data of the original frame.
binaryData
)

This is a copy-constructor, used by sub-classes to implement Resource#send().

Method Summary

Modifier and TypeMethod and Description
public Buffer
public boolean
isFinalFragment()

Flag to indicate if this frame is the final fragment in a message.

public int
rsv()

Bits used for extensions to the standard.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from io.netty5.buffer.BufferHolder:
closeequalsgetBuffergetBufferVolatilehashCodeisAccessiblereceivereplaceBufferreplaceBufferVolatilesendtouch

Field Detail

finalFragmentback to summary
private final boolean finalFragment

Flag to indicate if this frame is the final fragment in a message. The first fragment (frame) may also be the final fragment.

rsvback to summary
private final int rsv

RSV1, RSV2, RSV3 used for extensions

Constructor Detail

WebSocketFrameback to summary
protected WebSocketFrame(Buffer binaryData)
WebSocketFrameback to summary
protected WebSocketFrame(Send<Buffer> binaryData)
WebSocketFrameback to summary
protected WebSocketFrame(boolean finalFragment, int rsv, Buffer binaryData)
WebSocketFrameback to summary
protected WebSocketFrame(WebSocketFrame copyFrom, Buffer binaryData)

This is a copy-constructor, used by sub-classes to implement Resource#send(). The life cycle of the binaryData buffer is not manipulated by this constructor, but instead stored as-is.

Parameters
copyFrom:WebSocketFrame

The original frame instance to copy from.

binaryData:Buffer

The binary data of the original frame.

Method Detail

binaryDataback to summary
public Buffer binaryData()
isFinalFragmentback to summary
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.

rsvback to summary
public int rsv()

Bits used for extensions to the standard.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override