Home / Class/ Http3PushStreamClientInitializer Class — netty Architecture

Http3PushStreamClientInitializer Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  73e8abcd_7c18_039f_7c2e_328f3fa65aeb["Http3PushStreamClientInitializer"]
  65a6e7b7_5939_5f26_b337_fbaafcab4bfe["Http3PushStreamClientInitializer.java"]
  73e8abcd_7c18_039f_7c2e_328f3fa65aeb -->|defined in| 65a6e7b7_5939_5f26_b337_fbaafcab4bfe
  d218fb4e_b2c6_f30f_168f_8664292e3127["initChannel()"]
  73e8abcd_7c18_039f_7c2e_328f3fa65aeb -->|method| d218fb4e_b2c6_f30f_168f_8664292e3127
  22cd0fc2_38d2_d586_7af4_da209efe1fce["initPushStream()"]
  73e8abcd_7c18_039f_7c2e_328f3fa65aeb -->|method| 22cd0fc2_38d2_d586_7af4_da209efe1fce

Relationship Graph

Source Code

codec-http3/src/main/java/io/netty/handler/codec/http3/Http3PushStreamClientInitializer.java lines 29–61

public abstract class Http3PushStreamClientInitializer extends ChannelInitializer<QuicStreamChannel> {

    @Override
    protected final void initChannel(QuicStreamChannel ch) {
        if (isServerInitiatedQuicStream(ch)) {
            throw new IllegalArgumentException("Using client push stream initializer for server stream: " +
                    ch.streamId());
        }
        Http3CodecUtils.verifyIsUnidirectional(ch);

        Http3ConnectionHandler connectionHandler = Http3CodecUtils.getConnectionHandlerOrClose(ch.parent());
        if (connectionHandler == null) {
            // connection should have been closed
            return;
        }
        ChannelPipeline pipeline = ch.pipeline();
        Http3RequestStreamDecodeStateValidator decodeStateValidator = new Http3RequestStreamDecodeStateValidator();
        // Add the encoder and decoder in the pipeline, so we can handle Http3Frames
        pipeline.addLast(connectionHandler.newCodec(NO_STATE, decodeStateValidator));
        pipeline.addLast(decodeStateValidator);
        // Add the handler that will validate what we write and receive on this stream.
        pipeline.addLast(connectionHandler.newPushStreamValidationHandler(ch, decodeStateValidator));
        initPushStream(ch);
    }

    /**
     * Initialize the {@link QuicStreamChannel} to handle {@link Http3PushStreamFrame}s. At the point of calling this
     * method it is already valid to write {@link Http3PushStreamFrame}s as the codec is already in the pipeline.
     *
     * @param ch the {QuicStreamChannel} for the push stream.
     */
    protected abstract void initPushStream(QuicStreamChannel ch);
}

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free