Home / Function/ writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail() — netty Function Reference

writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail() — netty Function Reference

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

Function java Buffer Allocators calls 1 called by 4

Entity Profile

Dependency Diagram

graph TD
  0a0fd199_06c5_f2f7_c496_f1e7f6091012["writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail()"]
  0d6189e8_c033_39ff_d087_9019351440fe["Http2ConnectionRoundtripTest"]
  0a0fd199_06c5_f2f7_c496_f1e7f6091012 -->|defined in| 0d6189e8_c033_39ff_d087_9019351440fe
  8440f97d_48a5_3f77_b9e1_1c2cd2b88260["writeOfEmptyReleasedBufferSingleBufferQueuedInFlowControllerShouldFail()"]
  8440f97d_48a5_3f77_b9e1_1c2cd2b88260 -->|calls| 0a0fd199_06c5_f2f7_c496_f1e7f6091012
  4dd98bbd_c20f_5ffe_f1ca_a77836fc434f["writeOfEmptyReleasedBufferSingleBufferTrailersQueuedInFlowControllerShouldFail()"]
  4dd98bbd_c20f_5ffe_f1ca_a77836fc434f -->|calls| 0a0fd199_06c5_f2f7_c496_f1e7f6091012
  05ca2d25_e74b_54d1_b656_fc2b85a53e58["writeOfEmptyReleasedBufferMultipleBuffersQueuedInFlowControllerShouldFail()"]
  05ca2d25_e74b_54d1_b656_fc2b85a53e58 -->|calls| 0a0fd199_06c5_f2f7_c496_f1e7f6091012
  de697897_4ac8_f341_78ab_affe1490130b["writeOfEmptyReleasedBufferMultipleBuffersTrailersQueuedInFlowControllerShouldFail()"]
  de697897_4ac8_f341_78ab_affe1490130b -->|calls| 0a0fd199_06c5_f2f7_c496_f1e7f6091012
  1dd685b8_9b56_5b35_70ca_7f2bf9016254["bootstrapEnv()"]
  0a0fd199_06c5_f2f7_c496_f1e7f6091012 -->|calls| 1dd685b8_9b56_5b35_70ca_7f2bf9016254
  style 0a0fd199_06c5_f2f7_c496_f1e7f6091012 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionRoundtripTest.java lines 664–709

    private void writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail(final WriteEmptyBufferMode mode)
            throws Exception {
        bootstrapEnv(1, 1, 2, 1);

        final ChannelPromise emptyDataPromise = newPromise();
        runInChannel(clientChannel, new Http2Runnable() {
            @Override
            public void run() throws Http2Exception {
                http2Client.encoder().writeHeaders(ctx(), 3, EmptyHttp2Headers.INSTANCE, 0, (short) 16, false, 0, false,
                        newPromise());
                ByteBuf emptyBuf = Unpooled.buffer();
                emptyBuf.release();
                switch (mode) {
                    case SINGLE_END_OF_STREAM:
                        http2Client.encoder().writeData(ctx(), 3, emptyBuf, 0, true, emptyDataPromise);
                        break;
                    case SECOND_END_OF_STREAM:
                        http2Client.encoder().writeData(ctx(), 3, emptyBuf, 0, false, emptyDataPromise);
                        http2Client.encoder().writeData(ctx(), 3, randomBytes(8), 0, true, newPromise());
                        break;
                    case SINGLE_WITH_TRAILERS:
                        http2Client.encoder().writeData(ctx(), 3, emptyBuf, 0, false, emptyDataPromise);
                        http2Client.encoder().writeHeaders(ctx(), 3, EmptyHttp2Headers.INSTANCE, 0,
                                (short) 16, false, 0, true, newPromise());
                        break;
                    case SECOND_WITH_TRAILERS:
                        http2Client.encoder().writeData(ctx(), 3, emptyBuf, 0, false, emptyDataPromise);
                        http2Client.encoder().writeData(ctx(), 3, randomBytes(8), 0, false, newPromise());
                        http2Client.encoder().writeHeaders(ctx(), 3, EmptyHttp2Headers.INSTANCE, 0,
                                (short) 16, false, 0, true, newPromise());
                        break;
                    default:
                        throw new Error("Unexpected WriteEmptyBufferMode: " + mode);
                }
                http2Client.flush(ctx());
            }
        });

        ExecutionException e = assertThrows(ExecutionException.class, new Executable() {
            @Override
            public void execute() throws Throwable {
                emptyDataPromise.get();
            }
        });
        assertInstanceOf(IllegalReferenceCountException.class, e.getCause());
    }

Domain

Subdomains

Frequently Asked Questions

What does writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail() do?
writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionRoundtripTest.java.
Where is writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail() defined?
writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionRoundtripTest.java at line 664.
What does writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail() call?
writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail() calls 1 function(s): bootstrapEnv.
What calls writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail()?
writeOfEmptyReleasedBufferQueuedInFlowControllerShouldFail() is called by 4 function(s): writeOfEmptyReleasedBufferMultipleBuffersQueuedInFlowControllerShouldFail, writeOfEmptyReleasedBufferMultipleBuffersTrailersQueuedInFlowControllerShouldFail, writeOfEmptyReleasedBufferSingleBufferQueuedInFlowControllerShouldFail, writeOfEmptyReleasedBufferSingleBufferTrailersQueuedInFlowControllerShouldFail.

Analyze Your Own Codebase

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

Try Supermodel Free