Top Description Fields Constructors Methods
io.netty.channel

public abstract Class ChannelHandlerAdapter

extends Object
implements ChannelHandler
Class Inheritance
All Implemented Interfaces
io.netty.channel.ChannelHandler
Known Direct Subclasses
io.netty.channel.ChannelInboundHandlerAdapter, io.netty.channel.ChannelOutboundHandlerAdapter
Imports
io.netty.channel.ChannelHandlerMask.Skip, io.netty.util.internal.InternalThreadLocalMap, java.util.Map

Skeleton implementation of a ChannelHandler.

Field Summary

Modifier and TypeField and Description
pack-priv boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
public void
public void
handlerAdded(ChannelHandlerContext ctx)

Implements io.netty.channel.ChannelHandler.handlerAdded.

Do nothing by default, sub-classes may override this method.
public void
handlerRemoved(ChannelHandlerContext ctx)

Implements io.netty.channel.ChannelHandler.handlerRemoved.

Do nothing by default, sub-classes may override this method.
public boolean
isSharable()

Return true if the implementation is Sharable and so can be added to different ChannelPipelines.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

addedback to summary
pack-priv boolean added

Constructor Detail

ChannelHandlerAdapterback to summary
public ChannelHandlerAdapter()

Method Detail

ensureNotSharableback to summary
protected void ensureNotSharable()

Throws IllegalStateException if ChannelHandlerAdapter#isSharable() returns true

exceptionCaughtback to summary
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception

Implements io.netty.channel.ChannelHandler.exceptionCaught.

Deprecated

is part of ChannelInboundHandler

Calls ChannelHandlerContext#fireExceptionCaught(Throwable) to forward to the next ChannelHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Skip
@Override
@Deprecated
handlerAddedback to summary
public void handlerAdded(ChannelHandlerContext ctx) throws Exception

Implements io.netty.channel.ChannelHandler.handlerAdded.

Do nothing by default, sub-classes may override this method.

Annotations
@Override
handlerRemovedback to summary
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception

Implements io.netty.channel.ChannelHandler.handlerRemoved.

Do nothing by default, sub-classes may override this method.

Annotations
@Override
isSharableback to summary
public boolean isSharable()

Return true if the implementation is Sharable and so can be added to different ChannelPipelines.