Module io.netty5.codec.http
Class ContinuationWebSocketFrame
- java.lang.Object
-
- io.netty5.buffer.api.BufferHolder<WebSocketFrame>
-
- io.netty5.handler.codec.http.websocketx.WebSocketFrame
-
- io.netty5.handler.codec.http.websocketx.ContinuationWebSocketFrame
-
- All Implemented Interfaces:
io.netty5.util.Resource<WebSocketFrame>
,AutoCloseable
public class ContinuationWebSocketFrame extends WebSocketFrame
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
Constructors Constructor Description ContinuationWebSocketFrame(boolean finalFragment, int rsv, io.netty5.buffer.api.Buffer binaryData)
Creates a new continuation frame with the specified binary data.ContinuationWebSocketFrame(io.netty5.buffer.api.Buffer binaryData)
Creates a new continuation frame with the specified binary data.ContinuationWebSocketFrame(io.netty5.buffer.api.BufferAllocator allocator, boolean finalFragment, int rsv, String text)
Creates a new continuation frame with the specified text data
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WebSocketFrame
receive(io.netty5.buffer.api.Buffer buf)
String
text()
Returns the text data in this frame.-
Methods inherited from class io.netty5.handler.codec.http.websocketx.WebSocketFrame
binaryData, isFinalFragment, rsv, toString
-
-
-
-
Constructor Detail
-
ContinuationWebSocketFrame
public ContinuationWebSocketFrame(io.netty5.buffer.api.Buffer binaryData)
Creates a new continuation frame with the specified binary data. The final fragment flag is set to true.- Parameters:
binaryData
- the content of the frame.
-
ContinuationWebSocketFrame
public ContinuationWebSocketFrame(boolean finalFragment, int rsv, io.netty5.buffer.api.Buffer binaryData)
Creates a new continuation frame with the specified binary data.- Parameters:
finalFragment
- flag indicating if this frame is the final fragmentrsv
- reserved bits used for protocol extensionsbinaryData
- the content of the frame.
-
ContinuationWebSocketFrame
public ContinuationWebSocketFrame(io.netty5.buffer.api.BufferAllocator allocator, boolean finalFragment, int rsv, String text)
Creates a new continuation frame with the specified text data- Parameters:
allocator
-BufferAllocator
to use for allocating data.finalFragment
- flag indicating if this frame is the final fragmentrsv
- reserved bits used for protocol extensionstext
- text content of the frame.
-
-
Method Detail
-
text
public String text()
Returns the text data in this frame.
-
receive
protected WebSocketFrame receive(io.netty5.buffer.api.Buffer buf)
- Specified by:
receive
in classio.netty5.buffer.api.BufferHolder<WebSocketFrame>
-
-