Home / Function/ testChannelUnregistrationWithCustomExecutor() — netty Function Reference

testChannelUnregistrationWithCustomExecutor() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  24c05e1e_ac1b_0799_0696_886d56eda00f["testChannelUnregistrationWithCustomExecutor()"]
  666d912b_4166_a807_ed10_ba12f328a7b2["DefaultChannelPipelineTest"]
  24c05e1e_ac1b_0799_0696_886d56eda00f -->|defined in| 666d912b_4166_a807_ed10_ba12f328a7b2
  334cdc74_534d_6da3_5f50_18fefd532fce["channelUnregistered()"]
  24c05e1e_ac1b_0799_0696_886d56eda00f -->|calls| 334cdc74_534d_6da3_5f50_18fefd532fce
  0734e696_bf2a_45af_707c_9731756d1f7d["close()"]
  24c05e1e_ac1b_0799_0696_886d56eda00f -->|calls| 0734e696_bf2a_45af_707c_9731756d1f7d
  2a755a4a_592b_4884_97d8_3106d317dca2["deregister()"]
  24c05e1e_ac1b_0799_0696_886d56eda00f -->|calls| 2a755a4a_592b_4884_97d8_3106d317dca2
  style 24c05e1e_ac1b_0799_0696_886d56eda00f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java lines 1162–1191

    @Test
    public void testChannelUnregistrationWithCustomExecutor() throws Exception {
        final CountDownLatch channelLatch = new CountDownLatch(1);
        final CountDownLatch handlerLatch = new CountDownLatch(1);
        ChannelPipeline pipeline = new LocalChannel().pipeline();
        pipeline.addLast(new ChannelInitializer<Channel>() {
            @Override
            protected void initChannel(Channel ch) {
                ch.pipeline().addLast(new WrapperExecutor(),
                        new ChannelInboundHandlerAdapter() {

                            @Override
                            public void channelUnregistered(ChannelHandlerContext ctx) {
                                channelLatch.countDown();
                            }

                            @Override
                            public void handlerRemoved(ChannelHandlerContext ctx) {
                                handlerLatch.countDown();
                            }
                        });
            }
        });
        Channel channel = pipeline.channel();
        group.register(channel);
        channel.close();
        channel.deregister();
        assertTrue(channelLatch.await(2, TimeUnit.SECONDS));
        assertTrue(handlerLatch.await(2, TimeUnit.SECONDS));
    }

Domain

Subdomains

Frequently Asked Questions

What does testChannelUnregistrationWithCustomExecutor() do?
testChannelUnregistrationWithCustomExecutor() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java.
Where is testChannelUnregistrationWithCustomExecutor() defined?
testChannelUnregistrationWithCustomExecutor() is defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java at line 1162.
What does testChannelUnregistrationWithCustomExecutor() call?
testChannelUnregistrationWithCustomExecutor() calls 3 function(s): channelUnregistered, close, deregister.

Analyze Your Own Codebase

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

Try Supermodel Free