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, 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 channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
Channel has read a message from the peer.Exceptionvoid 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.Exceptionvoid userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception
Exceptionvoid channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception
Channel changed. You can check the state with
Channel.isWritable().Exceptionvoid exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
Throwable was thrown.exceptionCaught in interface ChannelHandlerExceptionCopyright © 2008–2025 The Netty Project. All rights reserved.