public interface ChannelInboundHandler extends ChannelHandler
ChannelHandler which adds callbacks for state changes. This allows the user
to hook in to state changes easily.ChannelHandler.Sharable| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(ChannelHandlerContext ctx)
The
Channel of the ChannelHandlerContext is now active |
void |
channelInactive(ChannelHandlerContext ctx)
The
Channel of the ChannelHandlerContext was registered is now inactive and reached its
end of lifetime. |
void |
channelReadSuspended(ChannelHandlerContext ctx)
Invoked when a
ChannelOutboundInvoker.read() is finished and the inbound buffer of this handler will not
be updated until another ChannelOutboundInvoker.read() request is issued. |
void |
channelRegistered(ChannelHandlerContext ctx)
|
void |
channelUnregistered(ChannelHandlerContext ctx)
|
void |
channelWritabilityChanged(ChannelHandlerContext ctx)
Gets called once the writable state of a
Channel changed. |
void |
messageReceived(ChannelHandlerContext ctx,
MessageList<Object> msgs)
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.
|
exceptionCaught, handlerAdded, handlerRemovedvoid channelRegistered(ChannelHandlerContext ctx) throws Exception
Exceptionvoid channelUnregistered(ChannelHandlerContext ctx) throws Exception
Exceptionvoid channelActive(ChannelHandlerContext ctx) throws Exception
Channel of the ChannelHandlerContext is now activeExceptionvoid channelInactive(ChannelHandlerContext ctx) throws Exception
Channel of the ChannelHandlerContext was registered is now inactive and reached its
end of lifetime.Exceptionvoid channelReadSuspended(ChannelHandlerContext ctx) throws Exception
ChannelOutboundInvoker.read() is finished and the inbound buffer of this handler will not
be updated until another ChannelOutboundInvoker.read() request is issued.Exceptionvoid messageReceived(ChannelHandlerContext ctx, MessageList<Object> msgs) throws Exception
ChannelHandlerContext was updated with new data.
This means something may be ready to get processed by the actual ChannelInboundHandler
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.Exceptionvoid userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception
Exceptionvoid channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception
Channel changed. You can check the state with
Channel.isWritable().ExceptionCopyright © 2008-2013 The Netty Project. All Rights Reserved.