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 channelRead(ChannelHandlerContext, Object)
method returns automatically. If you are looking for a ChannelInboundHandler implementation that
releases the received messages automatically, please see SimpleChannelInboundHandler.
ChannelHandler.Sharable| 构造器和说明 |
|---|
ChannelInboundHandlerAdapter() |
ensureNotSharable, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAdded, handlerRemovedpublic void channelRegistered(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerContext.fireChannelRegistered() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelRegistered 在接口中 ChannelInboundHandlerjava.lang.Exceptionpublic void channelUnregistered(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerContext.fireChannelUnregistered() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelUnregistered 在接口中 ChannelInboundHandlerjava.lang.Exceptionpublic void channelActive(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerContext.fireChannelActive() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelActive 在接口中 ChannelInboundHandlerjava.lang.Exceptionpublic void channelInactive(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerContext.fireChannelInactive() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelInactive 在接口中 ChannelInboundHandlerjava.lang.Exceptionpublic void channelRead(ChannelHandlerContext ctx, java.lang.Object msg) throws java.lang.Exception
ChannelHandlerContext.fireChannelRead(Object) to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelRead 在接口中 ChannelInboundHandlerjava.lang.Exceptionpublic void channelReadComplete(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerContext.fireChannelReadComplete() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelReadComplete 在接口中 ChannelInboundHandlerjava.lang.Exceptionpublic void userEventTriggered(ChannelHandlerContext ctx, java.lang.Object evt) throws java.lang.Exception
ChannelHandlerContext.fireUserEventTriggered(Object) to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.userEventTriggered 在接口中 ChannelInboundHandlerjava.lang.Exceptionpublic void channelWritabilityChanged(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerContext.fireChannelWritabilityChanged() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelWritabilityChanged 在接口中 ChannelInboundHandlerjava.lang.Exceptionpublic void exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception
ChannelHandlerContext.fireExceptionCaught(Throwable) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.exceptionCaught 在接口中 ChannelHandlerexceptionCaught 在接口中 ChannelInboundHandlerexceptionCaught 在类中 ChannelHandlerAdapterjava.lang.Exception