public class ChannelStateHandlerAdapter extends Object implements ChannelStateHandler
ChannelHandler.Sharable| Constructor and Description |
|---|
ChannelStateHandlerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterAdd(ChannelHandlerContext ctx)
Gets called after the
ChannelHandler was added to the actual context. |
void |
afterRemove(ChannelHandlerContext ctx)
Gets called after the
ChannelHandler was removed from the actual context. |
void |
beforeAdd(ChannelHandlerContext ctx)
Gets called before the
ChannelHandler is added to the actual context. |
void |
beforeRemove(ChannelHandlerContext ctx)
Gets called before the
ChannelHandler is removed from the actual context. |
void |
channelActive(ChannelHandlerContext ctx) |
void |
channelInactive(ChannelHandlerContext ctx) |
void |
channelRegistered(ChannelHandlerContext ctx) |
void |
channelUnregistered(ChannelHandlerContext ctx) |
void |
exceptionCaught(ChannelHandlerContext ctx,
Throwable cause)
Gets called if a
Throwable was thrown. |
void |
inboundBufferUpdated(ChannelHandlerContext ctx)
The inbound buffer of the
ChannelHandlerContext was updated with new data. |
void |
userEventTriggered(ChannelHandlerContext ctx,
Object evt)
Gets called if an user event was triggered.
|
public void beforeAdd(ChannelHandlerContext ctx) throws Exception
ChannelHandlerChannelHandler is added to the actual context.beforeAdd in interface ChannelHandlerExceptionpublic void afterAdd(ChannelHandlerContext ctx) throws Exception
ChannelHandlerChannelHandler was added to the actual context.afterAdd in interface ChannelHandlerExceptionpublic void beforeRemove(ChannelHandlerContext ctx) throws Exception
ChannelHandlerChannelHandler is removed from the actual context.beforeRemove in interface ChannelHandlerExceptionpublic void afterRemove(ChannelHandlerContext ctx) throws Exception
ChannelHandlerChannelHandler was removed from the actual context.afterRemove in interface ChannelHandlerExceptionpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
ChannelHandlerThrowable was thrown.exceptionCaught in interface ChannelHandlerExceptionpublic void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception
ChannelHandleruserEventTriggered in interface ChannelHandlerExceptionpublic void channelRegistered(ChannelHandlerContext ctx) throws Exception
channelRegistered in interface ChannelStateHandlerExceptionpublic void channelUnregistered(ChannelHandlerContext ctx) throws Exception
channelUnregistered in interface ChannelStateHandlerExceptionpublic void channelActive(ChannelHandlerContext ctx) throws Exception
channelActive in interface ChannelStateHandlerExceptionpublic void channelInactive(ChannelHandlerContext ctx) throws Exception
channelInactive in interface ChannelStateHandlerExceptionpublic void inboundBufferUpdated(ChannelHandlerContext ctx) throws Exception
ChannelStateHandlerChannelHandlerContext was updated with new data.
This means something may be ready to get processed by the actual ChannelStateHandler
implementation. It's up to the implementation to consume it or keep it in the buffer
to wait for more data and consume it later.inboundBufferUpdated in interface ChannelStateHandlerExceptionCopyright © 2008-2012 The Netty Project. All Rights Reserved.