Home / Function/ entityRequestEntityResponse() — netty Function Reference

entityRequestEntityResponse() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  dd8cad60_7ec8_75c0_7085_0a2323c15234["entityRequestEntityResponse()"]
  71f17950_8fc4_c3e9_2e13_384d1ac7ea2c["Http2FrameCodecTest"]
  dd8cad60_7ec8_75c0_7085_0a2323c15234 -->|defined in| 71f17950_8fc4_c3e9_2e13_384d1ac7ea2c
  style dd8cad60_7ec8_75c0_7085_0a2323c15234 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java lines 255–295

    @Test
    public void entityRequestEntityResponse() throws Exception {
        frameInboundWriter.writeInboundHeaders(1, request, 0, false);

        Http2Stream stream = frameCodec.connection().stream(1);
        assertNotNull(stream);
        assertEquals(State.OPEN, stream.state());

        Http2HeadersFrame inboundHeaders = inboundHandler.readInbound();
        Http2FrameStream stream2 = inboundHeaders.stream();
        assertNotNull(stream2);
        assertEquals(1, stream2.id());
        assertEquals(new DefaultHttp2HeadersFrame(request, false).stream(stream2), inboundHeaders);
        assertNull(inboundHandler.readInbound());

        ByteBuf hello = bb("hello");
        frameInboundWriter.writeInboundData(1, hello, 31, true);
        Http2DataFrame inboundData = inboundHandler.readInbound();
        Http2DataFrame expected = new DefaultHttp2DataFrame(bb("hello"), true, 31).stream(stream2);
        assertEqualsAndRelease(expected, inboundData);

        assertNull(inboundHandler.readInbound());

        channel.writeOutbound(new DefaultHttp2HeadersFrame(response, false).stream(stream2));
        verify(frameWriter).writeHeaders(eqFrameCodecCtx(), eq(1), eq(response),
                eq(0), eq(false), anyChannelPromise());

        channel.writeOutbound(new DefaultHttp2DataFrame(bb("world"), true, 27).stream(stream2));
        ArgumentCaptor<ByteBuf> outboundData = ArgumentCaptor.forClass(ByteBuf.class);
        verify(frameWriter).writeData(eqFrameCodecCtx(), eq(1), outboundData.capture(), eq(27),
                                      eq(true), anyChannelPromise());

        ByteBuf bb = bb("world");
        assertEquals(bb, outboundData.getValue());
        assertEquals(1, outboundData.getValue().refCnt());
        bb.release();
        outboundData.getValue().release();

        verify(frameWriter, never()).writeRstStream(eqFrameCodecCtx(), anyInt(), anyLong(), anyChannelPromise());
        assertTrue(channel.isActive());
    }

Domain

Subdomains

Frequently Asked Questions

What does entityRequestEntityResponse() do?
entityRequestEntityResponse() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java.
Where is entityRequestEntityResponse() defined?
entityRequestEntityResponse() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java at line 255.

Analyze Your Own Codebase

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

Try Supermodel Free