Home / Class/ Http3ServerConnectionHandler Class — netty Architecture

Http3ServerConnectionHandler Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  bf0c8de8_912a_8590_5f07_20a9e72e30d4["Http3ServerConnectionHandler"]
  f566aa2d_4f3a_c872_dda0_a2a1b9f0ab02["Http3ServerConnectionHandler.java"]
  bf0c8de8_912a_8590_5f07_20a9e72e30d4 -->|defined in| f566aa2d_4f3a_c872_dda0_a2a1b9f0ab02
  8b356889_cecf_8b1f_ded6_2a63355267f2["Http3ServerConnectionHandler()"]
  bf0c8de8_912a_8590_5f07_20a9e72e30d4 -->|method| 8b356889_cecf_8b1f_ded6_2a63355267f2
  c8025f8e_e01e_ec68_d533_e66f87074725["initBidirectionalStream()"]
  bf0c8de8_912a_8590_5f07_20a9e72e30d4 -->|method| c8025f8e_e01e_ec68_d533_e66f87074725
  7673f979_7149_3645_bd88_36b624d261da["initUnidirectionalStream()"]
  bf0c8de8_912a_8590_5f07_20a9e72e30d4 -->|method| 7673f979_7149_3645_bd88_36b624d261da

Relationship Graph

Source Code

codec-http3/src/main/java/io/netty/handler/codec/http3/Http3ServerConnectionHandler.java lines 31–118

public final class Http3ServerConnectionHandler extends Http3ConnectionHandler {
    private final ChannelHandler requestStreamHandler;

    /**
     * Create a new instance.
     *
     * @param requestStreamHandler  the {@link ChannelHandler} that is used for each new request stream.
     *                              This handler will receive {@link Http3HeadersFrame} and {@link Http3DataFrame}s.
     */
    public Http3ServerConnectionHandler(ChannelHandler requestStreamHandler) {
        this(requestStreamHandler, null, null, null, true);
    }

    /**
     * Create a new instance.
     * @param requestStreamHandler                  the {@link ChannelHandler} that is used for each new request stream.
     *                                              This handler will receive {@link Http3HeadersFrame} and
     *                                              {@link Http3DataFrame}s.
     * @param inboundControlStreamHandler           the {@link ChannelHandler} which will be notified about
     *                                              {@link Http3RequestStreamFrame}s or {@code null} if the user is not
     *                                              interested in these.
     * @param unknownInboundStreamHandlerFactory    the {@link LongFunction} that will provide a custom
     *                                              {@link ChannelHandler} for unknown inbound stream types or
     *                                              {@code null} if no special handling should be done.
     * @param localSettings                         the local {@link Http3SettingsFrame} that should be sent to the
     *                                              remote peer or {@code null} if the default settings should be used.
     * @param disableQpackDynamicTable              If QPACK dynamic table should be disabled.
     */
    public Http3ServerConnectionHandler(ChannelHandler requestStreamHandler,
                                        @Nullable ChannelHandler inboundControlStreamHandler,
                                        @Nullable LongFunction<ChannelHandler> unknownInboundStreamHandlerFactory,
                                        @Nullable Http3SettingsFrame localSettings, boolean disableQpackDynamicTable) {
        this(requestStreamHandler, inboundControlStreamHandler, unknownInboundStreamHandlerFactory,
                localSettings, disableQpackDynamicTable, null);
    }

    /**
     * Create a new instance.
     * @param requestStreamHandler                  the {@link ChannelHandler} that is used for each new request stream.
     *                                              This handler will receive {@link Http3HeadersFrame} and
     *                                              {@link Http3DataFrame}s.
     * @param inboundControlStreamHandler           the {@link ChannelHandler} which will be notified about
     *                                              {@link Http3RequestStreamFrame}s or {@code null} if the user is not
     *                                              interested in these.
     * @param unknownInboundStreamHandlerFactory    the {@link LongFunction} that will provide a custom
     *                                              {@link ChannelHandler} for unknown inbound stream types or
     *                                              {@code null} if no special handling should be done.
     * @param localSettings                         the local {@link Http3SettingsFrame} that should be sent to the
     *                                              remote peer or {@code null} if the default settings should be used.
     * @param disableQpackDynamicTable              If QPACK dynamic table should be disabled.
     * @param nonStandardSettingsValidator          the {@link Http3Settings.NonStandardHttp3SettingsValidator} to
     *                                              use when validating settings that are non-standard.
     */
    public Http3ServerConnectionHandler(ChannelHandler requestStreamHandler,
                                        @Nullable ChannelHandler inboundControlStreamHandler,
                                        @Nullable LongFunction<ChannelHandler> unknownInboundStreamHandlerFactory,
                                        @Nullable Http3SettingsFrame localSettings, boolean disableQpackDynamicTable,
                                        @Nullable Http3Settings.NonStandardHttp3SettingsValidator
                                                nonStandardSettingsValidator) {
        super(true, inboundControlStreamHandler, unknownInboundStreamHandlerFactory, localSettings,
                disableQpackDynamicTable, nonStandardSettingsValidator);
        this.requestStreamHandler = ObjectUtil.checkNotNull(requestStreamHandler, "requestStreamHandler");
    }

    @Override
    void initBidirectionalStream(ChannelHandlerContext ctx, QuicStreamChannel streamChannel) {
        ChannelPipeline pipeline = streamChannel.pipeline();
        Http3RequestStreamEncodeStateValidator encodeStateValidator = new Http3RequestStreamEncodeStateValidator();
        Http3RequestStreamDecodeStateValidator decodeStateValidator = new Http3RequestStreamDecodeStateValidator();
        // Add the encoder and decoder in the pipeline so we can handle Http3Frames
        pipeline.addLast(newCodec(encodeStateValidator, decodeStateValidator));
        pipeline.addLast(encodeStateValidator);
        pipeline.addLast(decodeStateValidator);
        pipeline.addLast(newRequestStreamValidationHandler(streamChannel, encodeStateValidator, decodeStateValidator));
        pipeline.addLast(requestStreamHandler);
    }

    @Override
    void initUnidirectionalStream(ChannelHandlerContext ctx, QuicStreamChannel streamChannel) {
        final long maxTableCapacity = maxTableCapacity();
        streamChannel.pipeline().addLast(

Frequently Asked Questions

What is the Http3ServerConnectionHandler class?
Http3ServerConnectionHandler is a class in the netty codebase, defined in codec-http3/src/main/java/io/netty/handler/codec/http3/Http3ServerConnectionHandler.java.
Where is Http3ServerConnectionHandler defined?
Http3ServerConnectionHandler is defined in codec-http3/src/main/java/io/netty/handler/codec/http3/Http3ServerConnectionHandler.java at line 31.

Analyze Your Own Codebase

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

Try Supermodel Free