Home / Function/ handlerAdded() — netty Function Reference

handlerAdded() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b99c9c30_8611_5f76_7839_3df99f435379["handlerAdded()"]
  550dceea_3958_0e89_1405_ee683da73397["QuicCodecDispatcher"]
  b99c9c30_8611_5f76_7839_3df99f435379 -->|defined in| 550dceea_3958_0e89_1405_ee683da73397
  46b75928_94e5_915a_3dd4_003e024bf44b["ChannelHandlerContextDispatcher()"]
  b99c9c30_8611_5f76_7839_3df99f435379 -->|calls| 46b75928_94e5_915a_3dd4_003e024bf44b
  94e20dc2_3f57_0092_4278_0fcdf1ba00af["initChannel()"]
  b99c9c30_8611_5f76_7839_3df99f435379 -->|calls| 94e20dc2_3f57_0092_4278_0fcdf1ba00af
  style b99c9c30_8611_5f76_7839_3df99f435379 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicCodecDispatcher.java lines 85–101

    @Override
    public final void handlerAdded(ChannelHandlerContext ctx) throws Exception {
        super.handlerAdded(ctx);

        ChannelHandlerContextDispatcher ctxDispatcher = new ChannelHandlerContextDispatcher(ctx);
        contextList.add(ctxDispatcher);
        int idx = contextList.indexOf(ctxDispatcher);
        try {
            QuicConnectionIdGenerator idGenerator = newIdGenerator((short) idx);
            initChannel(ctx.channel(), localConnectionIdLength, idGenerator);
        } catch (Exception e) {
            // Null out on exception and rethrow. We not remove the element as the indices need to be
            // stable.
            contextList.set(idx, null);
            throw e;
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does handlerAdded() do?
handlerAdded() is a function in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicCodecDispatcher.java.
Where is handlerAdded() defined?
handlerAdded() is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicCodecDispatcher.java at line 85.
What does handlerAdded() call?
handlerAdded() calls 2 function(s): ChannelHandlerContextDispatcher, initChannel.

Analyze Your Own Codebase

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

Try Supermodel Free