Home / Function/ AbstractHttp2StreamChannel() — netty Function Reference

AbstractHttp2StreamChannel() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  913eecb4_a5fd_00ee_6dbc_41735192e10a["AbstractHttp2StreamChannel()"]
  bcb58015_0c85_17e2_f1b3_0c1ad3aaa388["AbstractHttp2StreamChannel"]
  913eecb4_a5fd_00ee_6dbc_41735192e10a -->|defined in| bcb58015_0c85_17e2_f1b3_0c1ad3aaa388
  c9703b2f_6638_8afe_037a_9077f1bed51c["incrementPendingOutboundBytes()"]
  913eecb4_a5fd_00ee_6dbc_41735192e10a -->|calls| c9703b2f_6638_8afe_037a_9077f1bed51c
  7134f1fa_478b_d2e6_89ea_148d0d477e26["decrementPendingOutboundBytes()"]
  913eecb4_a5fd_00ee_6dbc_41735192e10a -->|calls| 7134f1fa_478b_d2e6_89ea_148d0d477e26
  d9489d27_eb38_f479_449a_ad360854297d["closeWithError()"]
  913eecb4_a5fd_00ee_6dbc_41735192e10a -->|calls| d9489d27_eb38_f479_449a_ad360854297d
  style 913eecb4_a5fd_00ee_6dbc_41735192e10a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2StreamChannel.java lines 215–253

    AbstractHttp2StreamChannel(DefaultHttp2FrameStream stream, int id, ChannelHandler inboundHandler) {
        this.stream = stream;
        stream.attachment = this;
        pipeline = new DefaultChannelPipeline(this) {
            @Override
            protected void incrementPendingOutboundBytes(long size) {
                AbstractHttp2StreamChannel.this.incrementPendingOutboundBytes(size, true);
            }

            @Override
            protected void decrementPendingOutboundBytes(long size) {
                AbstractHttp2StreamChannel.this.decrementPendingOutboundBytes(size, true);
            }

            @Override
            protected void onUnhandledInboundException(Throwable cause) {
                // Ensure we use the correct Http2Error to close the channel.
                if (cause instanceof Http2FrameStreamException) {
                    closeWithError(((Http2FrameStreamException) cause).error());
                    return;
                } else {
                    Http2Exception exception = Http2CodecUtil.getEmbeddedHttp2Exception(cause);
                    if (exception != null) {
                        closeWithError(exception.error());
                        return;
                    }
                }
                super.onUnhandledInboundException(cause);
            }
        };

        closePromise = pipeline.newPromise();
        channelId = new Http2StreamChannelId(parent().id(), id);

        if (inboundHandler != null) {
            // Add the handler to the pipeline now that we are registered.
            pipeline.addLast(inboundHandler);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does AbstractHttp2StreamChannel() do?
AbstractHttp2StreamChannel() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2StreamChannel.java.
Where is AbstractHttp2StreamChannel() defined?
AbstractHttp2StreamChannel() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2StreamChannel.java at line 215.
What does AbstractHttp2StreamChannel() call?
AbstractHttp2StreamChannel() calls 3 function(s): closeWithError, decrementPendingOutboundBytes, incrementPendingOutboundBytes.

Analyze Your Own Codebase

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

Try Supermodel Free