Top Description Methods
io.netty.channel

public Interface ChannelInboundHandler

extends ChannelHandler
Known Direct Implementers
io.netty.channel.DefaultChannelPipeline.TailContext, io.netty.channel.DefaultChannelPipeline.HeadContext, io.netty.channel.ChannelInboundHandlerAdapter

ChannelHandler which adds callbacks for state changes. This allows the user to hook in to state changes easily.

Method Summary

Modifier and TypeMethod and Description
public void
public void
channelInactive(ChannelHandlerContext ctx)

The Channel of the ChannelHandlerContext was registered is now inactive and reached its end of lifetime.

public void
channelRead(ChannelHandlerContext ctx, Object msg)

Invoked when the current Channel has read a message from the peer.

public void
channelReadComplete(ChannelHandlerContext ctx)

Invoked when the last message read by the current read operation has been consumed by channelRead(ChannelHandlerContext, Object).

public void
public void
public void
channelWritabilityChanged(ChannelHandlerContext ctx)

Gets called once the writable state of a Channel changed.

public void
public void
userEventTriggered(ChannelHandlerContext ctx, Object evt)

Gets called if an user event was triggered.

Inherited from io.netty.channel.ChannelHandler:
handlerAddedhandlerRemoved

Method Detail

channelActiveback to summary
public void channelActive(ChannelHandlerContext ctx) throws Exception

The Channel of the ChannelHandlerContext is now active

channelInactiveback to summary
public void channelInactive(ChannelHandlerContext ctx) throws Exception

The Channel of the ChannelHandlerContext was registered is now inactive and reached its end of lifetime.

channelReadback to summary
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception

Invoked when the current Channel has read a message from the peer.

channelReadCompleteback to summary
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception

Invoked when the last message read by the current read operation has been consumed by 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.

channelRegisteredback to summary
public void channelRegistered(ChannelHandlerContext ctx) throws Exception

The Channel of the ChannelHandlerContext was registered with its EventLoop

channelUnregisteredback to summary
public void channelUnregistered(ChannelHandlerContext ctx) throws Exception

The Channel of the ChannelHandlerContext was unregistered from its EventLoop

channelWritabilityChangedback to summary
public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception

Gets called once the writable state of a Channel changed. You can check the state with Channel#isWritable().

exceptionCaughtback to summary
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception

Redeclares io.netty.channel.ChannelHandler.exceptionCaught.

Gets called if a Throwable was thrown.

Annotations
@Override
@SuppressWarnings:deprecation
userEventTriggeredback to summary
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception

Gets called if an user event was triggered.