Home / Class/ QuicChannelValidationHandler Class — netty Architecture

QuicChannelValidationHandler Class — netty Architecture

Architecture documentation for the QuicChannelValidationHandler class in QuicChannelValidationHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  858f6594_9114_78cb_d9e8_4624d5776ed3["QuicChannelValidationHandler"]
  bbdac1c3_f06d_c745_bcf4_66e2882ddd86["QuicChannelValidationHandler.java"]
  858f6594_9114_78cb_d9e8_4624d5776ed3 -->|defined in| bbdac1c3_f06d_c745_bcf4_66e2882ddd86
  c35ec4cc_4089_f6f9_f026_b4d5d6bdb474["exceptionCaught()"]
  858f6594_9114_78cb_d9e8_4624d5776ed3 -->|method| c35ec4cc_4089_f6f9_f026_b4d5d6bdb474
  976a5bcb_8ddd_8ff7_0363_84d1dcfa2997["channelActive()"]
  858f6594_9114_78cb_d9e8_4624d5776ed3 -->|method| 976a5bcb_8ddd_8ff7_0363_84d1dcfa2997
  13fcbf07_9fac_123d_e4fa_52b616c35746["QuicConnectionAddress()"]
  858f6594_9114_78cb_d9e8_4624d5776ed3 -->|method| 13fcbf07_9fac_123d_e4fa_52b616c35746
  5a96c979_0fca_e08f_a05d_ec69eaa7699e["assertState()"]
  858f6594_9114_78cb_d9e8_4624d5776ed3 -->|method| 5a96c979_0fca_e08f_a05d_ec69eaa7699e

Relationship Graph

Source Code

codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelValidationHandler.java lines 23–61

class QuicChannelValidationHandler extends ChannelInboundHandlerAdapter {
    private volatile boolean wasActive;

    private volatile QuicConnectionAddress localAddress;
    private volatile QuicConnectionAddress remoteAddress;
    private volatile Throwable cause;

    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
        this.cause = cause;
    }

    @Override
    public void channelActive(ChannelHandlerContext ctx) {
        localAddress = (QuicConnectionAddress) ctx.channel().localAddress();
        remoteAddress = (QuicConnectionAddress) ctx.channel().remoteAddress();
        wasActive = true;
        ctx.fireChannelActive();
    }

    QuicConnectionAddress localAddress() {
        return localAddress;
    }

    QuicConnectionAddress remoteAddress() {
        return remoteAddress;
    }

    void assertState() throws Throwable {
        if (cause != null) {
            throw cause;
        }
        if (wasActive) {
            // Validate that the addresses could be retrieved
            assertNotNull(localAddress);
            assertNotNull(remoteAddress);
        }
    }
}

Frequently Asked Questions

What is the QuicChannelValidationHandler class?
QuicChannelValidationHandler is a class in the netty codebase, defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelValidationHandler.java.
Where is QuicChannelValidationHandler defined?
QuicChannelValidationHandler is defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelValidationHandler.java at line 23.

Analyze Your Own Codebase

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

Try Supermodel Free