Class TextWebSocketFrame
- java.lang.Object
-
- io.netty.buffer.DefaultByteBufHolder
-
- io.netty.handler.codec.http.websocketx.WebSocketFrame
-
- io.netty.handler.codec.http.websocketx.TextWebSocketFrame
-
- All Implemented Interfaces:
io.netty.buffer.ByteBufHolder
,io.netty.util.ReferenceCounted
public class TextWebSocketFrame extends WebSocketFrame
Web Socket text frame.
-
-
Constructor Summary
Constructors Constructor Description TextWebSocketFrame()
Creates a new empty text frame.TextWebSocketFrame(boolean finalFragment, int rsv, io.netty.buffer.ByteBuf binaryData)
Creates a new text frame with the specified binary data and the final fragment flag.TextWebSocketFrame(boolean finalFragment, int rsv, String text)
Creates a new text frame with the specified text string.TextWebSocketFrame(io.netty.buffer.ByteBuf binaryData)
Creates a new text frame with the specified binary data.TextWebSocketFrame(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 TextWebSocketFrame
copy()
TextWebSocketFrame
duplicate()
TextWebSocketFrame
replace(io.netty.buffer.ByteBuf content)
TextWebSocketFrame
retain()
TextWebSocketFrame
retain(int increment)
TextWebSocketFrame
retainedDuplicate()
String
text()
Returns the text data in this frame.TextWebSocketFrame
touch()
TextWebSocketFrame
touch(Object hint)
-
Methods inherited from class io.netty.handler.codec.http.websocketx.WebSocketFrame
isFinalFragment, rsv, toString
-
-
-
-
Constructor Detail
-
TextWebSocketFrame
public TextWebSocketFrame()
Creates a new empty text frame.
-
TextWebSocketFrame
public TextWebSocketFrame(String text)
Creates a new text frame with the specified text string. The final fragment flag is set to true.- Parameters:
text
- String to put in the frame.
-
TextWebSocketFrame
public TextWebSocketFrame(io.netty.buffer.ByteBuf 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(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:
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.netty.buffer.ByteBuf 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.
-
copy
public TextWebSocketFrame copy()
- Specified by:
copy
in interfaceio.netty.buffer.ByteBufHolder
- Overrides:
copy
in classWebSocketFrame
-
duplicate
public TextWebSocketFrame duplicate()
- Specified by:
duplicate
in interfaceio.netty.buffer.ByteBufHolder
- Overrides:
duplicate
in classWebSocketFrame
-
retainedDuplicate
public TextWebSocketFrame retainedDuplicate()
- Specified by:
retainedDuplicate
in interfaceio.netty.buffer.ByteBufHolder
- Overrides:
retainedDuplicate
in classWebSocketFrame
-
replace
public TextWebSocketFrame replace(io.netty.buffer.ByteBuf content)
- Specified by:
replace
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
replace
in classWebSocketFrame
-
retain
public TextWebSocketFrame retain()
- Specified by:
retain
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
retain
in interfaceio.netty.util.ReferenceCounted
- Overrides:
retain
in classWebSocketFrame
-
retain
public TextWebSocketFrame retain(int increment)
- Specified by:
retain
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
retain
in interfaceio.netty.util.ReferenceCounted
- Overrides:
retain
in classWebSocketFrame
-
touch
public TextWebSocketFrame touch()
- Specified by:
touch
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
touch
in interfaceio.netty.util.ReferenceCounted
- Overrides:
touch
in classWebSocketFrame
-
touch
public TextWebSocketFrame touch(Object hint)
- Specified by:
touch
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
touch
in interfaceio.netty.util.ReferenceCounted
- Overrides:
touch
in classWebSocketFrame
-
-