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

public Class ContinuationWebSocketFrame

extends WebSocketFrame
Class Inheritance
Imports
io.netty5.buffer.Buffer, .BufferAllocator, java.nio.charset.StandardCharsets

Web Socket continuation frame containing continuation text or binary data. This is used for fragmented messages where the contents of a messages is contained more than 1 frame.

Constructor Summary

AccessConstructor and Description
public
ContinuationWebSocketFrame(Buffer
the content of the frame.
binaryData
)

Creates a new continuation frame with the specified binary data.

public
ContinuationWebSocketFrame(boolean
flag indicating if this frame is the final fragment
finalFragment
,
int
reserved bits used for protocol extensions
rsv
,
Buffer
the content of the frame.
binaryData
)

Creates a new continuation frame with the specified binary data.

public
ContinuationWebSocketFrame(BufferAllocator
BufferAllocator to use for allocating data.
allocator
,
boolean
flag indicating if this frame is the final fragment
finalFragment
,
int
reserved bits used for protocol extensions
rsv
,
String
text content of the frame.
text
)

Creates a new continuation frame with the specified text data

private

Method Summary

Modifier and TypeMethod and Description
private static Buffer
fromText(BufferAllocator allocator, String
text to store.
text
)

Sets the string for this frame.

protected WebSocketFrame
receive(Buffer
The Buffer that is received by the recipient, and needs to be wrapped in a new BufferHolder instance.
buf
)

Implements abstract io.netty5.buffer.BufferHolder.receive.

Called when a sent BufferHolder is received by the recipient.
public String
text()

Returns the text data in this frame.

Inherited from io.netty5.handler.codec.http.websocketx.WebSocketFrame:
binaryDataisFinalFragmentrsvtoString

Constructor Detail

ContinuationWebSocketFrameback to summary
public ContinuationWebSocketFrame(Buffer binaryData)

Creates a new continuation frame with the specified binary data. The final fragment flag is set to true.

Parameters
binaryData:Buffer

the content of the frame.

ContinuationWebSocketFrameback to summary
public ContinuationWebSocketFrame(boolean finalFragment, int rsv, Buffer binaryData)

Creates a new continuation frame with the specified binary data.

Parameters
finalFragment:boolean

flag indicating if this frame is the final fragment

rsv:int

reserved bits used for protocol extensions

binaryData:Buffer

the content of the frame.

ContinuationWebSocketFrameback to summary
public ContinuationWebSocketFrame(BufferAllocator allocator, boolean finalFragment, int rsv, String text)

Creates a new continuation frame with the specified text data

Parameters
allocator:BufferAllocator

BufferAllocator to use for allocating data.

finalFragment:boolean

flag indicating if this frame is the final fragment

rsv:int

reserved bits used for protocol extensions

text:String

text content of the frame.

ContinuationWebSocketFrameback to summary
private ContinuationWebSocketFrame(ContinuationWebSocketFrame copyFrom, Buffer data)

Method Detail

fromTextback to summary
private static Buffer fromText(BufferAllocator allocator, String text)

Sets the string for this frame.

Parameters
text:String

text to store.

receiveback to summary
protected WebSocketFrame receive(Buffer buf)

Implements abstract io.netty5.buffer.BufferHolder.receive.

Doc from io.netty5.buffer.BufferHolder.receive.

Called when a sent BufferHolder is received by the recipient. The BufferHolder should return a new concrete instance, that wraps the given Buffer object.

Parameters
buf:Buffer

The Buffer that is received by the recipient, and needs to be wrapped in a new BufferHolder instance.

Returns:WebSocketFrame

A new buffer holder instance, containing the given buffer.

Annotations
@Override
textback to summary
public String text()

Returns the text data in this frame.