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 ChannelHandler
ChannelHandler.Sharable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidexceptionCaught(ChannelHandlerContext ctx, Throwable cause) Deprecated.voidDo nothing by default, sub-classes may override this method.voidDo nothing by default, sub-classes may override this method.booleanReturntrueif the implementation isChannelHandler.Sharableand so can be added to differentChannelPipelines.
-
Constructor Details
-
ChannelHandlerAdapter
public ChannelHandlerAdapter()
-
-
Method Details
-
ensureNotSharable
protected void ensureNotSharable() -
isSharable
public boolean isSharable()Returntrueif the implementation isChannelHandler.Sharableand so can be added to differentChannelPipelines. -
handlerAdded
Do nothing by default, sub-classes may override this method.- Specified by:
handlerAddedin interfaceChannelHandler- Throws:
Exception
-
handlerRemoved
Do nothing by default, sub-classes may override this method.- Specified by:
handlerRemovedin interfaceChannelHandler- Throws:
Exception
-
exceptionCaught
@Deprecated public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception Deprecated.is part ofChannelInboundHandlerCallsChannelHandlerContext.fireExceptionCaught(Throwable)to forward to the nextChannelHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
exceptionCaughtin interfaceChannelHandler- Throws:
Exception
-
ChannelInboundHandler