Package io.netty.channel
Class ChannelHandlerAdapter
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
- All Implemented Interfaces:
ChannelHandler
- Direct Known Subclasses:
ChannelInboundHandlerAdapter
,ChannelOutboundHandlerAdapter
,Http2FrameLogger
Skeleton implementation of a
ChannelHandler
.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
exceptionCaught
(ChannelHandlerContext ctx, Throwable cause) Deprecated.void
Do nothing by default, sub-classes may override this method.void
Do nothing by default, sub-classes may override this method.boolean
Returntrue
if the implementation isChannelHandler.Sharable
and so can be added to differentChannelPipeline
s.
-
Field Details
-
added
boolean added
-
-
Constructor Details
-
ChannelHandlerAdapter
public ChannelHandlerAdapter()
-
-
Method Details
-
ensureNotSharable
protected void ensureNotSharable() -
isSharable
public boolean isSharable()Returntrue
if the implementation isChannelHandler.Sharable
and so can be added to differentChannelPipeline
s. -
handlerAdded
Do nothing by default, sub-classes may override this method.- Specified by:
handlerAdded
in interfaceChannelHandler
- Throws:
Exception
-
handlerRemoved
Do nothing by default, sub-classes may override this method.- Specified by:
handlerRemoved
in interfaceChannelHandler
- Throws:
Exception
-
exceptionCaught
@Deprecated public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception Deprecated.is part ofChannelInboundHandler
CallsChannelHandlerContext.fireExceptionCaught(Throwable)
to forward to the nextChannelHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
exceptionCaught
in interfaceChannelHandler
- Throws:
Exception
-
ChannelInboundHandler