Interface LifeCycleAwareChannelHandler

All Superinterfaces:
ChannelHandler
All Known Implementing Classes:
BigIntegerDecoder, BufferedWriteHandler, ChunkedWriteHandler, CompatibleMarshallingDecoder, DelimiterBasedFrameDecoder, FixedLengthFrameDecoder, FrameDecoder, HttpChunkAggregator, HttpClientCodec.Decoder, HttpContentCompressor, HttpContentDecoder, HttpContentDecompressor, HttpContentEncoder, HttpMessageDecoder, HttpRequestDecoder, HttpResponseDecoder, IdleStateHandler, JdkZlibEncoder, LengthFieldBasedFrameDecoder, LineBasedFrameDecoder, MarshallingDecoder, ObjectDecoder, PortUnificationServerHandler, ProtobufVarint32FrameDecoder, ReadTimeoutHandler, ReplayingDecoder, RtspMessageDecoder, RtspRequestDecoder, RtspResponseDecoder, SocksAuthRequestDecoder, SocksAuthResponseDecoder, SocksCmdRequestDecoder, SocksCmdResponseDecoder, SocksInitRequestDecoder, SocksInitResponseDecoder, SpdyFrameCodec, SslHandler, WebSocket00FrameDecoder, WebSocket07FrameDecoder, WebSocket08FrameDecoder, WebSocket13FrameDecoder, WebSocketServerProtocolHandler, ZlibEncoder

public interface LifeCycleAwareChannelHandler extends ChannelHandler
A ChannelHandler that is notified when it is added to or removed from a ChannelPipeline.

Invalid access to the ChannelHandlerContext

Calling ChannelHandlerContext.sendUpstream(ChannelEvent) or ChannelHandlerContext.sendDownstream(ChannelEvent) in beforeAdd(ChannelHandlerContext) or afterRemove(ChannelHandlerContext) might lead to an unexpected behavior. It is because the context object might not have been fully added to the pipeline or the context object is not a part of the pipeline anymore respectively.