Home / Function/ testReplaceChannelHandler() — netty Function Reference

testReplaceChannelHandler() — netty Function Reference

Architecture documentation for the testReplaceChannelHandler() function in DefaultChannelPipelineTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  546dafe1_0509_af99_b137_e00b721fbbd8["testReplaceChannelHandler()"]
  666d912b_4166_a807_ed10_ba12f328a7b2["DefaultChannelPipelineTest"]
  546dafe1_0509_af99_b137_e00b721fbbd8 -->|defined in| 666d912b_4166_a807_ed10_ba12f328a7b2
  style 546dafe1_0509_af99_b137_e00b721fbbd8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java lines 256–279

    @Test
    public void testReplaceChannelHandler() {
        ChannelPipeline pipeline = new LocalChannel().pipeline();

        ChannelHandler handler1 = newHandler();
        pipeline.addLast("handler1", handler1);
        pipeline.addLast("handler2", handler1);
        pipeline.addLast("handler3", handler1);
        assertSame(pipeline.get("handler1"), handler1);
        assertSame(pipeline.get("handler2"), handler1);
        assertSame(pipeline.get("handler3"), handler1);

        ChannelHandler newHandler1 = newHandler();
        pipeline.replace("handler1", "handler1", newHandler1);
        assertSame(pipeline.get("handler1"), newHandler1);

        ChannelHandler newHandler3 = newHandler();
        pipeline.replace("handler3", "handler3", newHandler3);
        assertSame(pipeline.get("handler3"), newHandler3);

        ChannelHandler newHandler2 = newHandler();
        pipeline.replace("handler2", "handler2", newHandler2);
        assertSame(pipeline.get("handler2"), newHandler2);
    }

Domain

Subdomains

Frequently Asked Questions

What does testReplaceChannelHandler() do?
testReplaceChannelHandler() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java.
Where is testReplaceChannelHandler() defined?
testReplaceChannelHandler() is defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java at line 256.

Analyze Your Own Codebase

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

Try Supermodel Free