Home / Function/ handlerAdded() — netty Function Reference

handlerAdded() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  5a9b45ea_9551_a12f_e358_971fea29c51f["handlerAdded()"]
  f7baaa36_50d8_55ab_5867_911f99fb154d["IdleStateHandler"]
  5a9b45ea_9551_a12f_e358_971fea29c51f -->|defined in| f7baaa36_50d8_55ab_5867_911f99fb154d
  4f3a3baf_30e8_2b0d_6c6a_d067de69d6f6["channelActive()"]
  5a9b45ea_9551_a12f_e358_971fea29c51f -->|calls| 4f3a3baf_30e8_2b0d_6c6a_d067de69d6f6
  312a1b1a_95cc_67e5_2c1d_a72c71815889["initialize()"]
  5a9b45ea_9551_a12f_e358_971fea29c51f -->|calls| 312a1b1a_95cc_67e5_2c1d_a72c71815889
  style 5a9b45ea_9551_a12f_e358_971fea29c51f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java lines 240–251

    @Override
    public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
        this.ticker = ctx.executor().ticker();
        if (ctx.channel().isActive() && ctx.channel().isRegistered()) {
            // channelActive() event has been fired already, which means this.channelActive() will
            // not be invoked. We have to initialize here instead.
            initialize(ctx);
        } else {
            // channelActive() event has not been fired yet.  this.channelActive() will be invoked
            // and initialization will occur there.
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does handlerAdded() do?
handlerAdded() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java.
Where is handlerAdded() defined?
handlerAdded() is defined in handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java at line 240.
What does handlerAdded() call?
handlerAdded() calls 2 function(s): channelActive, initialize.

Analyze Your Own Codebase

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

Try Supermodel Free