Home / Function/ testReregister() — netty Function Reference

testReregister() — netty Function Reference

Architecture documentation for the testReregister() function in AbstractEventLoopTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  088487ae_7824_b92a_7a26_386bbaf0c2b1["testReregister()"]
  3af4ae7a_14bb_5400_5cb6_2dab6e677f86["AbstractEventLoopTest"]
  088487ae_7824_b92a_7a26_386bbaf0c2b1 -->|defined in| 3af4ae7a_14bb_5400_5cb6_2dab6e677f86
  ad9b962d_d7d4_34f1_3b1e_3c74ab939d1b["newChannel()"]
  088487ae_7824_b92a_7a26_386bbaf0c2b1 -->|calls| ad9b962d_d7d4_34f1_3b1e_3c74ab939d1b
  style 088487ae_7824_b92a_7a26_386bbaf0c2b1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/AbstractEventLoopTest.java lines 45–73

    @Test
    public void testReregister() {
        EventLoopGroup group = newEventLoopGroup();
        EventLoopGroup group2 = newEventLoopGroup();
        final EventExecutorGroup eventExecutorGroup = new DefaultEventExecutorGroup(2);

        ServerBootstrap bootstrap = new ServerBootstrap();
        ChannelFuture future = bootstrap.channel(newChannel()).group(group)
                .childHandler(new ChannelInitializer<SocketChannel>() {
                    @Override
                    public void initChannel(SocketChannel ch) {
                    }
                }).handler(new ChannelInitializer<ServerSocketChannel>() {
                    @Override
                    public void initChannel(ServerSocketChannel ch) {
                        ch.pipeline().addLast(new TestChannelHandler());
                        ch.pipeline().addLast(eventExecutorGroup, new TestChannelHandler2());
                    }
                })
                .bind(0).awaitUninterruptibly();

        EventExecutor executor = future.channel().pipeline().context(TestChannelHandler2.class).executor();
        EventExecutor executor1 = future.channel().pipeline().context(TestChannelHandler.class).executor();
        future.channel().deregister().awaitUninterruptibly();
        Channel channel = group2.register(future.channel()).awaitUninterruptibly().channel();
        EventExecutor executorNew = channel.pipeline().context(TestChannelHandler.class).executor();
        assertNotSame(executor1, executorNew);
        assertSame(executor, future.channel().pipeline().context(TestChannelHandler2.class).executor());
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testReregister() do?
testReregister() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/AbstractEventLoopTest.java.
Where is testReregister() defined?
testReregister() is defined in transport/src/test/java/io/netty/channel/AbstractEventLoopTest.java at line 45.
What does testReregister() call?
testReregister() calls 1 function(s): newChannel.

Analyze Your Own Codebase

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

Try Supermodel Free