public class WebSocketFrameAggregator extends MessageToMessageDecoder<WebSocketFrame>
WebSocketFrame
they will
just get forwarded to the next handler in the pipeline.ChannelHandler.Sharable
构造器和说明 |
---|
WebSocketFrameAggregator(int maxFrameSize)
Construct a new instance
|
限定符和类型 | 方法和说明 |
---|---|
void |
channelInactive(ChannelHandlerContext ctx)
Calls
ChannelHandlerContext.fireChannelInactive() to forward
to the next ChannelInboundHandler in the ChannelPipeline . |
protected void |
decode(ChannelHandlerContext ctx,
WebSocketFrame msg,
java.util.List<java.lang.Object> out)
Decode from one message to an other.
|
void |
handlerRemoved(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
acceptInboundMessage, channelRead
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded
public WebSocketFrameAggregator(int maxFrameSize)
maxFrameSize
- If the size of the aggregated frame exceeds this value,
a TooLongFrameException
is thrown.protected void decode(ChannelHandlerContext ctx, WebSocketFrame msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
MessageToMessageDecoder
decode
在类中 MessageToMessageDecoder<WebSocketFrame>
ctx
- the ChannelHandlerContext
which this MessageToMessageDecoder
belongs tomsg
- the message to decode to an other oneout
- the List
to which decoded messages should be addedjava.lang.Exception
- is thrown if an error occurspublic void channelInactive(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelInboundHandlerAdapter
ChannelHandlerContext.fireChannelInactive()
to forward
to the next ChannelInboundHandler
in the ChannelPipeline
.
Sub-classes may override this method to change behavior.channelInactive
在接口中 ChannelInboundHandler
channelInactive
在类中 ChannelInboundHandlerAdapter
java.lang.Exception
public void handlerRemoved(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerAdapter
handlerRemoved
在接口中 ChannelHandler
handlerRemoved
在类中 ChannelHandlerAdapter
java.lang.Exception