Module io.netty5.codec.http
Class WebSocket13FrameEncoder
- java.lang.Object
-
- io.netty5.channel.ChannelHandlerAdapter
-
- io.netty5.handler.codec.MessageToMessageEncoder<WebSocketFrame>
-
- io.netty5.handler.codec.http.websocketx.WebSocket13FrameEncoder
-
- All Implemented Interfaces:
ChannelHandler
,WebSocketFrameEncoder
public class WebSocket13FrameEncoder extends MessageToMessageEncoder<WebSocketFrame> implements WebSocketFrameEncoder
Encodes a web socket frame into wire protocol version 13 format. V13 is essentially the same as V8.
-
-
Constructor Summary
Constructors Constructor Description WebSocket13FrameEncoder(boolean maskPayload)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
encodeAndClose(ChannelHandlerContext ctx, WebSocketFrame msg, List<Object> out)
Encode from one message to another.-
Methods inherited from class io.netty5.handler.codec.MessageToMessageEncoder
acceptOutboundMessage, encode, write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty5.channel.ChannelHandler
bind, channelActive, channelExceptionCaught, channelInactive, channelInboundEvent, channelRead, channelReadComplete, channelRegistered, channelShutdown, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, flush, handlerAdded, handlerRemoved, isSharable, pendingOutboundBytes, read, register, sendOutboundEvent, shutdown, write
-
-
-
-
Method Detail
-
encodeAndClose
protected void encodeAndClose(ChannelHandlerContext ctx, WebSocketFrame msg, List<Object> out) throws Exception
Description copied from class:MessageToMessageEncoder
Encode from one message to another. This method will be called for each written message that can be handled by this encoder.The message will not be automatically disposed of after this call. Instead, the responsibility of ensuring that messages are disposed of falls upon the implementor of this method.
Subclasses that wish to have incoming messages automatically disposed of should instead override the
MessageToMessageEncoder.encode(ChannelHandlerContext, Object, List)
method.- Overrides:
encodeAndClose
in classMessageToMessageEncoder<WebSocketFrame>
- Parameters:
ctx
- theChannelHandlerContext
which thisMessageToMessageEncoder
belongs to.msg
- the message to encode to another one.out
- theList
into which produced output messages should be added.- Throws:
Exception
- is thrown if an error occurs.
-
-