Home / Function/ testServerNoContextTakeover() — netty Function Reference

testServerNoContextTakeover() — netty Function Reference

Architecture documentation for the testServerNoContextTakeover() function in PerMessageDeflateClientExtensionHandshakerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  a8bdfb0d_e101_2840_c151_ae0ecfdf0b7f["testServerNoContextTakeover()"]
  96c9ad65_49f4_dedc_4a3d_ff783cf8c162["PerMessageDeflateClientExtensionHandshakerTest"]
  a8bdfb0d_e101_2840_c151_ae0ecfdf0b7f -->|defined in| 96c9ad65_49f4_dedc_4a3d_ff783cf8c162
  style a8bdfb0d_e101_2840_c151_ae0ecfdf0b7f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateClientExtensionHandshakerTest.java lines 162–188

    @Test
    public void testServerNoContextTakeover() {
        WebSocketClientExtension extension;
        Map<String, String> parameters;

        PerMessageDeflateClientExtensionHandshaker handshaker =
                new PerMessageDeflateClientExtensionHandshaker(6, true, 15, true, false, 0);

        parameters = new HashMap<String, String>();
        parameters.put(SERVER_NO_CONTEXT, null);
        extension = handshaker.handshakeExtension(new WebSocketExtensionData(PERMESSAGE_DEFLATE_EXTENSION, parameters));

        // Test that handshake succeeds when server responds with `server_no_context_takeover` that we didn't offer
        assertNotNull(extension);
        assertEquals(RSV1, extension.rsv());
        assertTrue(extension.newExtensionDecoder() instanceof PerMessageDeflateDecoder);
        assertTrue(extension.newExtensionEncoder() instanceof PerMessageDeflateEncoder);

        // initialize
        handshaker = new PerMessageDeflateClientExtensionHandshaker(6, true, 15, true, true, 0);

        parameters = new HashMap<String, String>();
        extension = handshaker.handshakeExtension(new WebSocketExtensionData(PERMESSAGE_DEFLATE_EXTENSION, parameters));

        // Test that handshake fails when client offers `server_no_context_takeover` but server doesn't support it
        assertNull(extension);
    }

Domain

Subdomains

Frequently Asked Questions

What does testServerNoContextTakeover() do?
testServerNoContextTakeover() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateClientExtensionHandshakerTest.java.
Where is testServerNoContextTakeover() defined?
testServerNoContextTakeover() is defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/extensions/compression/PerMessageDeflateClientExtensionHandshakerTest.java at line 162.

Analyze Your Own Codebase

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

Try Supermodel Free