Home / Function/ clientRequestOneDataFrame() — netty Function Reference

clientRequestOneDataFrame() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  eb2294ce_f41c_9d1f_eb2d_d4a966f17e07["clientRequestOneDataFrame()"]
  b5bf07b2_a16a_fa49_d2b2_c4bdea19488b["InboundHttp2ToHttpAdapterTest"]
  eb2294ce_f41c_9d1f_eb2d_d4a966f17e07 -->|defined in| b5bf07b2_a16a_fa49_d2b2_c4bdea19488b
  ab34dca1_da01_a824_4707_d9e1e8e727ee["boostrapEnv()"]
  eb2294ce_f41c_9d1f_eb2d_d4a966f17e07 -->|calls| ab34dca1_da01_a824_4707_d9e1e8e727ee
  87ba315e_fc35_dcbd_e7ab_2b528883bdaa["awaitRequests()"]
  eb2294ce_f41c_9d1f_eb2d_d4a966f17e07 -->|calls| 87ba315e_fc35_dcbd_e7ab_2b528883bdaa
  style eb2294ce_f41c_9d1f_eb2d_d4a966f17e07 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapterTest.java lines 261–292

    @Test
    public void clientRequestOneDataFrame() throws Exception {
        boostrapEnv(1, 1, 1);
        final String text = "hello world";
        final ByteBuf content = Unpooled.copiedBuffer(text.getBytes());
        final FullHttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET,
                "/some/path/resource2", content, true);
        try {
            HttpHeaders httpHeaders = request.headers();
            httpHeaders.setInt(HttpConversionUtil.ExtensionHeaderNames.STREAM_ID.text(), 3);
            httpHeaders.setInt(HttpHeaderNames.CONTENT_LENGTH, text.length());
            httpHeaders.setShort(HttpConversionUtil.ExtensionHeaderNames.STREAM_WEIGHT.text(), (short) 16);
            final Http2Headers http2Headers = new DefaultHttp2Headers().method(new AsciiString("GET")).path(
                    new AsciiString("/some/path/resource2"));
            runInChannel(clientChannel, new Http2Runnable() {
                @Override
                public void run() throws Http2Exception {
                    clientHandler.encoder().writeHeaders(ctxClient(), 3, http2Headers, 0, false, newPromiseClient());
                    clientHandler.encoder().writeData(ctxClient(), 3, content.retainedDuplicate(), 0, true,
                                                      newPromiseClient());
                    clientChannel.flush();
                }
            });
            awaitRequests();
            ArgumentCaptor<FullHttpMessage> requestCaptor = ArgumentCaptor.forClass(FullHttpMessage.class);
            verify(serverListener).messageReceived(requestCaptor.capture());
            capturedRequests = requestCaptor.getAllValues();
            assertEquals(request, capturedRequests.get(0));
        } finally {
            request.release();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does clientRequestOneDataFrame() do?
clientRequestOneDataFrame() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapterTest.java.
Where is clientRequestOneDataFrame() defined?
clientRequestOneDataFrame() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapterTest.java at line 261.
What does clientRequestOneDataFrame() call?
clientRequestOneDataFrame() calls 2 function(s): awaitRequests, boostrapEnv.

Analyze Your Own Codebase

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

Try Supermodel Free