Home / Class/ Http2FrameInboundWriter Class — netty Architecture

Http2FrameInboundWriter Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763["Http2FrameInboundWriter"]
  db89c011_4d0b_28cc_edb1_5ae078c76d93["Http2FrameInboundWriter.java"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|defined in| db89c011_4d0b_28cc_edb1_5ae078c76d93
  04a7149a_a2d1_4916_c978_8d33206720b8["Http2FrameInboundWriter()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| 04a7149a_a2d1_4916_c978_8d33206720b8
  c17931b7_86b1_81e2_392d_62d2a96616a0["writeInboundData()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| c17931b7_86b1_81e2_392d_62d2a96616a0
  cf372343_30b7_b7c7_7902_b2c9a2bc4923["writeInboundHeaders()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| cf372343_30b7_b7c7_7902_b2c9a2bc4923
  7302ab5c_2ff9_d7cb_3b5d_676e8d006ef7["writeInboundPriority()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| 7302ab5c_2ff9_d7cb_3b5d_676e8d006ef7
  a42f6e51_206e_7195_6205_7a6430fd3bdd["writeInboundRstStream()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| a42f6e51_206e_7195_6205_7a6430fd3bdd
  36975269_221f_ed5c_d336_e62a503a688c["writeInboundSettings()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| 36975269_221f_ed5c_d336_e62a503a688c
  6da504dd_cd97_e65c_dd1c_74ba3a79c9af["writeInboundSettingsAck()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| 6da504dd_cd97_e65c_dd1c_74ba3a79c9af
  3255519e_9bf9_e2e3_9195_9263da82d148["writeInboundPing()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| 3255519e_9bf9_e2e3_9195_9263da82d148
  b979dec9_e59f_fe49_7d0f_c30c859ea358["writePushPromise()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| b979dec9_e59f_fe49_7d0f_c30c859ea358
  87bf0f88_82a0_5172_e3ac_cd5a1d3d4342["writeInboundGoAway()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| 87bf0f88_82a0_5172_e3ac_cd5a1d3d4342
  00f85239_0f5f_510a_f0db_58451951c326["writeInboundWindowUpdate()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| 00f85239_0f5f_510a_f0db_58451951c326
  fcbe0369_69bb_1ab6_fff9_a6d214c4a638["writeInboundFrame()"]
  2048cb79_dfbd_77a2_ea54_c71e7ccc2763 -->|method| fcbe0369_69bb_1ab6_fff9_a6d214c4a638

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameInboundWriter.java lines 39–340

final class Http2FrameInboundWriter {

    private final ChannelHandlerContext ctx;
    private final Http2FrameWriter writer;

    Http2FrameInboundWriter(EmbeddedChannel channel) {
        this(channel, new DefaultHttp2FrameWriter());
    }

    Http2FrameInboundWriter(EmbeddedChannel channel, Http2FrameWriter writer) {
        ctx = new WriteInboundChannelHandlerContext(channel);
        this.writer = writer;
    }

    void writeInboundData(int streamId, ByteBuf data, int padding, boolean endStream) {
        writer.writeData(ctx, streamId, data, padding, endStream, ctx.newPromise()).syncUninterruptibly();
    }

    void writeInboundHeaders(int streamId, Http2Headers headers,
                         int padding, boolean endStream) {
        writer.writeHeaders(ctx, streamId, headers, padding, endStream, ctx.newPromise()).syncUninterruptibly();
    }

    void writeInboundHeaders(int streamId, Http2Headers headers,
                               int streamDependency, short weight, boolean exclusive, int padding, boolean endStream) {
        writer.writeHeaders(ctx, streamId, headers, streamDependency,
                weight, exclusive, padding, endStream, ctx.newPromise()).syncUninterruptibly();
    }

    void writeInboundPriority(int streamId, int streamDependency,
                                short weight, boolean exclusive) {
        writer.writePriority(ctx, streamId, streamDependency, weight,
                exclusive, ctx.newPromise()).syncUninterruptibly();
    }

    void writeInboundRstStream(int streamId, long errorCode) {
        writer.writeRstStream(ctx, streamId, errorCode, ctx.newPromise()).syncUninterruptibly();
    }

    void writeInboundSettings(Http2Settings settings) {
        writer.writeSettings(ctx, settings, ctx.newPromise()).syncUninterruptibly();
    }

    void writeInboundSettingsAck() {
        writer.writeSettingsAck(ctx, ctx.newPromise()).syncUninterruptibly();
    }

    void writeInboundPing(boolean ack, long data) {
        writer.writePing(ctx, ack, data, ctx.newPromise()).syncUninterruptibly();
    }

    void writePushPromise(int streamId, int promisedStreamId,
                                   Http2Headers headers, int padding) {
           writer.writePushPromise(ctx, streamId, promisedStreamId,
                   headers, padding, ctx.newPromise()).syncUninterruptibly();
    }

    void writeInboundGoAway(int lastStreamId, long errorCode, ByteBuf debugData) {
        writer.writeGoAway(ctx, lastStreamId, errorCode, debugData, ctx.newPromise()).syncUninterruptibly();
    }

    void writeInboundWindowUpdate(int streamId, int windowSizeIncrement) {
        writer.writeWindowUpdate(ctx, streamId, windowSizeIncrement, ctx.newPromise()).syncUninterruptibly();
    }

    void writeInboundFrame(byte frameType, int streamId,
                             Http2Flags flags, ByteBuf payload) {
        writer.writeFrame(ctx, frameType, streamId, flags, payload, ctx.newPromise()).syncUninterruptibly();
    }

    private static final class WriteInboundChannelHandlerContext extends ChannelOutboundHandlerAdapter
            implements ChannelHandlerContext {
        private final EmbeddedChannel channel;

        WriteInboundChannelHandlerContext(EmbeddedChannel channel) {
            this.channel = channel;
        }

        @Override
        public Channel channel() {
            return channel;

Frequently Asked Questions

What is the Http2FrameInboundWriter class?
Http2FrameInboundWriter is a class in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameInboundWriter.java.
Where is Http2FrameInboundWriter defined?
Http2FrameInboundWriter is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameInboundWriter.java at line 39.

Analyze Your Own Codebase

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

Try Supermodel Free