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