Package io.netty.channel
Class ChannelInboundHandlerAdapter
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- All Implemented Interfaces:
ChannelHandler,ChannelInboundHandler
- Direct Known Subclasses:
AbstractRemoteAddressFilter,ApplicationProtocolNegotiationHandler,ByteToMessageDecoder,ChannelDuplexHandler,ChannelInitializer,Http3ConnectionHandler,Http3RequestStreamInboundHandler,HttpServerExpectContinueHandler,InboundHttpToHttp2Adapter,MessageToMessageDecoder,OcspClientHandler,OcspServerCertificateValidator,QuicCodecDispatcher,SimpleChannelInboundHandler,SimpleUserEventChannelHandler,SslMasterKeyHandler,Utf8FrameValidator
public class ChannelInboundHandlerAdapter extends ChannelHandlerAdapter implements ChannelInboundHandler
Abstract base class forChannelInboundHandlerimplementations which provide implementations of all of their methods.This implementation just forward the operation to the next
ChannelHandlerin theChannelPipeline. 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 aChannelInboundHandlerimplementation that releases the received messages automatically, please seeSimpleChannelInboundHandler.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description ChannelInboundHandlerAdapter()
-
Method Summary
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
-
-
-
Method Detail
-
channelRegistered
public void channelRegistered(ChannelHandlerContext ctx) throws java.lang.Exception
CallsChannelHandlerContext.fireChannelRegistered()to forward to the nextChannelInboundHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
channelRegisteredin interfaceChannelInboundHandler- Throws:
java.lang.Exception
-
channelUnregistered
public void channelUnregistered(ChannelHandlerContext ctx) throws java.lang.Exception
CallsChannelHandlerContext.fireChannelUnregistered()to forward to the nextChannelInboundHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
channelUnregisteredin interfaceChannelInboundHandler- Throws:
java.lang.Exception
-
channelActive
public void channelActive(ChannelHandlerContext ctx) throws java.lang.Exception
CallsChannelHandlerContext.fireChannelActive()to forward to the nextChannelInboundHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
channelActivein interfaceChannelInboundHandler- Throws:
java.lang.Exception
-
channelInactive
public void channelInactive(ChannelHandlerContext ctx) throws java.lang.Exception
CallsChannelHandlerContext.fireChannelInactive()to forward to the nextChannelInboundHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
channelInactivein interfaceChannelInboundHandler- Throws:
java.lang.Exception
-
channelRead
public void channelRead(ChannelHandlerContext ctx, java.lang.Object msg) throws java.lang.Exception
CallsChannelHandlerContext.fireChannelRead(Object)to forward to the nextChannelInboundHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
channelReadin interfaceChannelInboundHandler- Throws:
java.lang.Exception
-
channelReadComplete
public void channelReadComplete(ChannelHandlerContext ctx) throws java.lang.Exception
CallsChannelHandlerContext.fireChannelReadComplete()to forward to the nextChannelInboundHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
channelReadCompletein interfaceChannelInboundHandler- Throws:
java.lang.Exception
-
userEventTriggered
public void userEventTriggered(ChannelHandlerContext ctx, java.lang.Object evt) throws java.lang.Exception
CallsChannelHandlerContext.fireUserEventTriggered(Object)to forward to the nextChannelInboundHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
userEventTriggeredin interfaceChannelInboundHandler- Throws:
java.lang.Exception
-
channelWritabilityChanged
public void channelWritabilityChanged(ChannelHandlerContext ctx) throws java.lang.Exception
CallsChannelHandlerContext.fireChannelWritabilityChanged()to forward to the nextChannelInboundHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
channelWritabilityChangedin interfaceChannelInboundHandler- Throws:
java.lang.Exception
-
exceptionCaught
public void exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception
CallsChannelHandlerContext.fireExceptionCaught(Throwable)to forward to the nextChannelHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
exceptionCaughtin interfaceChannelHandler- Specified by:
exceptionCaughtin interfaceChannelInboundHandler- Overrides:
exceptionCaughtin classChannelHandlerAdapter- Throws:
java.lang.Exception
-
-