Home / Function/ handlerAdded() — netty Function Reference

handlerAdded() — netty Function Reference

Architecture documentation for the handlerAdded() function in ChannelInitializer.java from the netty codebase.

Function java Buffer Allocators calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  8660b724_b032_c48f_e8c9_33c1b4542ffe["handlerAdded()"]
  e8b02344_55ca_b96d_1e76_3f1acf3d80c6["ChannelInitializer"]
  8660b724_b032_c48f_e8c9_33c1b4542ffe -->|defined in| e8b02344_55ca_b96d_1e76_3f1acf3d80c6
  b1427cb1_eeae_cdf2_246b_5209d53f13ed["channelRegistered()"]
  b1427cb1_eeae_cdf2_246b_5209d53f13ed -->|calls| 8660b724_b032_c48f_e8c9_33c1b4542ffe
  5a672898_8ee2_8a02_cb4a_41c51216bcba["initChannel()"]
  8660b724_b032_c48f_e8c9_33c1b4542ffe -->|calls| 5a672898_8ee2_8a02_cb4a_41c51216bcba
  981476f2_0013_63bb_3526_de2c469ebf83["removeState()"]
  8660b724_b032_c48f_e8c9_33c1b4542ffe -->|calls| 981476f2_0013_63bb_3526_de2c469ebf83
  style 8660b724_b032_c48f_e8c9_33c1b4542ffe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/ChannelInitializer.java lines 104–117

    @Override
    public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
        if (ctx.channel().isRegistered()) {
            // This should always be true with our current DefaultChannelPipeline implementation.
            // The good thing about calling initChannel(...) in handlerAdded(...) is that there will be no ordering
            // surprises if a ChannelInitializer will add another ChannelInitializer. This is as all handlers
            // will be added in the expected order.
            if (initChannel(ctx)) {

                // We are done with init the Channel, removing the initializer now.
                removeState(ctx);
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does handlerAdded() do?
handlerAdded() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/ChannelInitializer.java.
Where is handlerAdded() defined?
handlerAdded() is defined in transport/src/main/java/io/netty/channel/ChannelInitializer.java at line 104.
What does handlerAdded() call?
handlerAdded() calls 2 function(s): initChannel, removeState.
What calls handlerAdded()?
handlerAdded() is called by 1 function(s): channelRegistered.

Analyze Your Own Codebase

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

Try Supermodel Free