Package org.jboss.netty.channel
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
AChannelHandlerthat is notified when it is added to or removed from aChannelPipeline.Invalid access to the
CallingChannelHandlerContextChannelHandlerContext.sendUpstream(ChannelEvent)orChannelHandlerContext.sendDownstream(ChannelEvent)inbeforeAdd(ChannelHandlerContext)orafterRemove(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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidafterAdd(ChannelHandlerContext ctx)voidafterRemove(ChannelHandlerContext ctx)voidbeforeAdd(ChannelHandlerContext ctx)voidbeforeRemove(ChannelHandlerContext ctx)
-
-
-
Method Detail
-
beforeAdd
void beforeAdd(ChannelHandlerContext ctx) throws java.lang.Exception
- Throws:
java.lang.Exception
-
afterAdd
void afterAdd(ChannelHandlerContext ctx) throws java.lang.Exception
- Throws:
java.lang.Exception
-
beforeRemove
void beforeRemove(ChannelHandlerContext ctx) throws java.lang.Exception
- Throws:
java.lang.Exception
-
afterRemove
void afterRemove(ChannelHandlerContext ctx) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-