public class ChannelInboundHandlerAdapter extends ChannelHandlerAdapter implements ChannelInboundHandler
ChannelInboundHandler implementations which provide
implementations of all of their methods.
This implementation just forward the operation to the next ChannelHandler in the
ChannelPipeline. Sub-classes may override a method implementation to change this.
Be aware that messages are not released after the messageReceived(ChannelHandlerContext, MessageList)
method returns automatically. This is done for make it as flexible as possible and get the most out of
performance. Because of this you need to explicit call MessageList.releaseAllAndRecycle() if you
consumed all the messages. Because this is such a common need SimpleChannelInboundHandler is provided ,
which will automatically release messages and the MessageList after processing is done.
ChannelHandler.Sharable| Constructor and Description |
|---|
ChannelInboundHandlerAdapter() |
exceptionCaught, handlerAdded, handlerRemovedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexceptionCaught, handlerAdded, handlerRemovedpublic void channelRegistered(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelRegistered() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelRegistered in interface ChannelInboundHandlerExceptionpublic void channelUnregistered(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelUnregistered() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelUnregistered in interface ChannelInboundHandlerExceptionpublic void channelActive(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelActive() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelActive in interface ChannelInboundHandlerExceptionpublic void channelInactive(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelInactive() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelInactive in interface ChannelInboundHandlerExceptionpublic void channelReadSuspended(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelReadSuspended() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelReadSuspended in interface ChannelInboundHandlerExceptionpublic void messageReceived(ChannelHandlerContext ctx, MessageList<Object> msgs) throws Exception
ChannelHandlerContext.fireMessageReceived(MessageList) to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.messageReceived in interface ChannelInboundHandlerExceptionpublic void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception
ChannelHandlerContext.fireUserEventTriggered(Object) to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.userEventTriggered in interface ChannelInboundHandlerExceptionpublic void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelWritabilityChanged() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelWritabilityChanged in interface ChannelInboundHandlerExceptionCopyright © 2008-2013 The Netty Project. All Rights Reserved.