Package org.jboss.netty.channel
Interface LifeCycleAwareChannelHandler
-
- All Superinterfaces:
ChannelHandler
- All Known Implementing Classes:
BigIntegerDecoder
,BufferedWriteHandler
,ChunkedWriteHandler
,CompatibleMarshallingDecoder
,DelimiterBasedFrameDecoder
,FixedLengthFrameDecoder
,FrameDecoder
,HttpChunkAggregator
,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
AChannelHandler
that is notified when it is added to or removed from aChannelPipeline
.Invalid access to the
CallingChannelHandlerContext
ChannelHandlerContext.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 void
afterAdd(ChannelHandlerContext ctx)
void
afterRemove(ChannelHandlerContext ctx)
void
beforeAdd(ChannelHandlerContext ctx)
void
beforeRemove(ChannelHandlerContext ctx)
-
-
-
Method Detail
-
beforeAdd
void beforeAdd(ChannelHandlerContext ctx) throws Exception
- Throws:
Exception
-
afterAdd
void afterAdd(ChannelHandlerContext ctx) throws Exception
- Throws:
Exception
-
beforeRemove
void beforeRemove(ChannelHandlerContext ctx) throws Exception
- Throws:
Exception
-
afterRemove
void afterRemove(ChannelHandlerContext ctx) throws Exception
- Throws:
Exception
-
-