Home / Type/ ChannelInboundHandler Type — netty Architecture

ChannelInboundHandler Type — netty Architecture

Architecture documentation for the ChannelInboundHandler type/interface in ChannelInboundHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5f74ac78_a3bc_32ad_7c9d_78f5cbd37d0b["ChannelInboundHandler"]
  0858e58f_4b82_11ca_cd17_1a18f518429a["ChannelInboundHandler.java"]
  5f74ac78_a3bc_32ad_7c9d_78f5cbd37d0b -->|defined in| 0858e58f_4b82_11ca_cd17_1a18f518429a
  style 5f74ac78_a3bc_32ad_7c9d_78f5cbd37d0b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/ChannelInboundHandler.java lines 22–75

public interface ChannelInboundHandler extends ChannelHandler {

    /**
     * The {@link Channel} of the {@link ChannelHandlerContext} was registered with its {@link EventLoop}
     */
    void channelRegistered(ChannelHandlerContext ctx) throws Exception;

    /**
     * The {@link Channel} of the {@link ChannelHandlerContext} was unregistered from its {@link EventLoop}
     */
    void channelUnregistered(ChannelHandlerContext ctx) throws Exception;

    /**
     * The {@link Channel} of the {@link ChannelHandlerContext} is now active
     */
    void channelActive(ChannelHandlerContext ctx) throws Exception;

    /**
     * The {@link Channel} of the {@link ChannelHandlerContext} was registered is now inactive and reached its
     * end of lifetime.
     */
    void channelInactive(ChannelHandlerContext ctx) throws Exception;

    /**
     * Invoked when the current {@link Channel} has read a message from the peer.
     */
    void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception;

    /**
     * Invoked when the last message read by the current read operation has been consumed by
     * {@link #channelRead(ChannelHandlerContext, Object)}.  If {@link ChannelOption#AUTO_READ} is off, no further
     * attempt to read an inbound data from the current {@link Channel} will be made until
     * {@link ChannelHandlerContext#read()} is called.
     */
    void channelReadComplete(ChannelHandlerContext ctx) throws Exception;

    /**
     * Gets called if an user event was triggered.
     */
    void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception;

    /**
     * Gets called once the writable state of a {@link Channel} changed. You can check the state with
     * {@link Channel#isWritable()}.
     */
    void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception;

    /**
     * Gets called if a {@link Throwable} was thrown.
     */
    @Override
    @SuppressWarnings("deprecation")
    void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception;
}

Frequently Asked Questions

What is the ChannelInboundHandler type?
ChannelInboundHandler is a type/interface in the netty codebase, defined in transport/src/main/java/io/netty/channel/ChannelInboundHandler.java.
Where is ChannelInboundHandler defined?
ChannelInboundHandler is defined in transport/src/main/java/io/netty/channel/ChannelInboundHandler.java at line 22.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free