Home / Function/ testFullHttpResponse() — netty Function Reference

testFullHttpResponse() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f74ab4f7_ab14_7d61_3fc4_3ae023957285["testFullHttpResponse()"]
  ea4ec426_b689_ab52_a554_7959aed6c709["HttpContentDecoderTest"]
  f74ab4f7_ab14_7d61_3fc4_3ae023957285 -->|defined in| ea4ec426_b689_ab52_a554_7959aed6c709
  2b987b60_3929_ae39_9df4_c066360347d1["calculateContentLength()"]
  f74ab4f7_ab14_7d61_3fc4_3ae023957285 -->|calls| 2b987b60_3929_ae39_9df4_c066360347d1
  9551636f_107c_5525_c2ac_6930ab7aab64["readContent()"]
  f74ab4f7_ab14_7d61_3fc4_3ae023957285 -->|calls| 9551636f_107c_5525_c2ac_6930ab7aab64
  e1fd631d_8d14_d190_2463_40108ec003a4["assertHasInboundMessages()"]
  f74ab4f7_ab14_7d61_3fc4_3ae023957285 -->|calls| e1fd631d_8d14_d190_2463_40108ec003a4
  465668ef_fec3_d4d9_164f_24dc020645ba["assertHasOutboundMessages()"]
  f74ab4f7_ab14_7d61_3fc4_3ae023957285 -->|calls| 465668ef_fec3_d4d9_164f_24dc020645ba
  style f74ab4f7_ab14_7d61_3fc4_3ae023957285 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java lines 660–685

    @Test
    public void testFullHttpResponse() {
        // test that ContentDecoder can be used after the ObjectAggregator
        HttpResponseDecoder decoder = new HttpResponseDecoder(4096, 4096, 5);
        HttpObjectAggregator aggregator = new HttpObjectAggregator(1024);
        HttpContentDecoder decompressor = new HttpContentDecompressor(0);
        EmbeddedChannel channel = new EmbeddedChannel(decoder, aggregator, decompressor);
        String headers = "HTTP/1.1 200 OK\r\n" +
                         "Content-Length: " + GZ_HELLO_WORLD.length + "\r\n" +
                         "Content-Encoding: gzip\r\n" +
                         "\r\n";
        assertTrue(channel.writeInbound(Unpooled.copiedBuffer(headers.getBytes(), GZ_HELLO_WORLD)));

        Queue<Object> resp = channel.inboundMessages();
        assertTrue(resp.size() > 1);
        int contentLength = 0;
        contentLength = calculateContentLength(resp, contentLength);

        byte[] receivedContent = readContent(resp, contentLength, true);

        assertEquals(HELLO_WORLD, new String(receivedContent, CharsetUtil.US_ASCII));

        assertHasInboundMessages(channel, true);
        assertHasOutboundMessages(channel, false);
        assertFalse(channel.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testFullHttpResponse() do?
testFullHttpResponse() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java.
Where is testFullHttpResponse() defined?
testFullHttpResponse() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java at line 660.
What does testFullHttpResponse() call?
testFullHttpResponse() calls 4 function(s): assertHasInboundMessages, assertHasOutboundMessages, calculateContentLength, readContent.

Analyze Your Own Codebase

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

Try Supermodel Free