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
,DnsNameResolver.DnsResponseHandler
,HttpServerExpectContinueHandler
,InboundHttpToHttp2Adapter
,MessageToMessageDecoder
,OcspClientHandler
,OcspServerCertificateValidator
,ServerBootstrap.ServerBootstrapAcceptor
,SimpleChannelInboundHandler
,SimpleUserEventChannelHandler
,SslMasterKeyHandler
,Utf8FrameValidator
,WebSocketClientProtocolHandshakeHandler
,WebSocketServerProtocolHandshakeHandler
public class ChannelInboundHandlerAdapter
extends ChannelHandlerAdapter
implements ChannelInboundHandler
Abstract base class for
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
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
Field Summary
Fields inherited from class io.netty.channel.ChannelHandlerAdapter
added
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
CallsChannelHandlerContext.fireChannelActive()
to forward to the nextChannelInboundHandler
in theChannelPipeline
.void
CallsChannelHandlerContext.fireChannelInactive()
to forward to the nextChannelInboundHandler
in theChannelPipeline
.void
channelRead
(ChannelHandlerContext ctx, Object msg) CallsChannelHandlerContext.fireChannelRead(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
.void
CallsChannelHandlerContext.fireChannelReadComplete()
to forward to the nextChannelInboundHandler
in theChannelPipeline
.void
CallsChannelHandlerContext.fireChannelRegistered()
to forward to the nextChannelInboundHandler
in theChannelPipeline
.void
CallsChannelHandlerContext.fireChannelUnregistered()
to forward to the nextChannelInboundHandler
in theChannelPipeline
.void
CallsChannelHandlerContext.fireChannelWritabilityChanged()
to forward to the nextChannelInboundHandler
in theChannelPipeline
.void
exceptionCaught
(ChannelHandlerContext ctx, Throwable cause) CallsChannelHandlerContext.fireExceptionCaught(Throwable)
to forward to the nextChannelHandler
in theChannelPipeline
.void
userEventTriggered
(ChannelHandlerContext ctx, Object evt) CallsChannelHandlerContext.fireUserEventTriggered(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
.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
-
Constructor Details
-
ChannelInboundHandlerAdapter
public ChannelInboundHandlerAdapter()
-
-
Method Details
-
channelRegistered
CallsChannelHandlerContext.fireChannelRegistered()
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelRegistered
in interfaceChannelInboundHandler
- Throws:
Exception
-
channelUnregistered
CallsChannelHandlerContext.fireChannelUnregistered()
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelUnregistered
in interfaceChannelInboundHandler
- Throws:
Exception
-
channelActive
CallsChannelHandlerContext.fireChannelActive()
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelActive
in interfaceChannelInboundHandler
- Throws:
Exception
-
channelInactive
CallsChannelHandlerContext.fireChannelInactive()
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelInactive
in interfaceChannelInboundHandler
- Throws:
Exception
-
channelRead
CallsChannelHandlerContext.fireChannelRead(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelRead
in interfaceChannelInboundHandler
- Throws:
Exception
-
channelReadComplete
CallsChannelHandlerContext.fireChannelReadComplete()
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelReadComplete
in interfaceChannelInboundHandler
- Throws:
Exception
-
userEventTriggered
CallsChannelHandlerContext.fireUserEventTriggered(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
userEventTriggered
in interfaceChannelInboundHandler
- Throws:
Exception
-
channelWritabilityChanged
CallsChannelHandlerContext.fireChannelWritabilityChanged()
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelWritabilityChanged
in interfaceChannelInboundHandler
- Throws:
Exception
-
exceptionCaught
CallsChannelHandlerContext.fireExceptionCaught(Throwable)
to forward to the nextChannelHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
exceptionCaught
in interfaceChannelHandler
- Specified by:
exceptionCaught
in interfaceChannelInboundHandler
- Overrides:
exceptionCaught
in classChannelHandlerAdapter
- Throws:
Exception
-