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 |
channelRead(ChannelHandlerContext ctx,
Object msg)
Invoked when the current
Channel has read a message from the peer. |
void |
channelReadComplete(ChannelHandlerContext ctx)
Invoked when the last message read by the current read operation has been consumed by
channelRead(ChannelHandlerContext, Object) . |
void |
channelRegistered(ChannelHandlerContext ctx)
|
void |
channelUnregistered(ChannelHandlerContext ctx)
|
void |
channelWritabilityChanged(ChannelHandlerContext ctx)
Gets called once the writable state of a
Channel changed. |
void |
exceptionCaught(ChannelHandlerContext ctx,
Throwable cause)
Gets called if a
Throwable was thrown. |
void |
userEventTriggered(ChannelHandlerContext ctx,
Object evt)
Gets called if an user event was triggered.
|
handlerAdded, handlerRemoved
void channelRegistered(ChannelHandlerContext ctx) throws Exception
Exception
void channelUnregistered(ChannelHandlerContext ctx) throws Exception
Exception
void channelActive(ChannelHandlerContext ctx) throws Exception
Channel
of the ChannelHandlerContext
is now activeException
void channelInactive(ChannelHandlerContext ctx) throws Exception
Channel
of the ChannelHandlerContext
was registered is now inactive and reached its
end of lifetime.Exception
void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
Channel
has read a message from the peer.Exception
void channelReadComplete(ChannelHandlerContext ctx) throws Exception
channelRead(ChannelHandlerContext, Object)
. If ChannelOption.AUTO_READ
is off, no further
attempt to read an inbound data from the current Channel
will be made until
ChannelHandlerContext.read()
is called.Exception
void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception
Exception
void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception
Channel
changed. You can check the state with
Channel.isWritable()
.Exception
void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
Throwable
was thrown.exceptionCaught
in interface ChannelHandler
Exception
Copyright © 2008–2017 The Netty Project. All rights reserved.