Home / Class/ TestPool Class — netty Architecture

TestPool Class — netty Architecture

Architecture documentation for the TestPool class in AbstractChannelPoolMapTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  818171a2_dace_9e44_90ff_74756912c079["TestPool"]
  8190cf66_d425_6ac0_18bf_a2f517283edb["AbstractChannelPoolMapTest.java"]
  818171a2_dace_9e44_90ff_74756912c079 -->|defined in| 8190cf66_d425_6ac0_18bf_a2f517283edb
  2b6669f0_232d_e078_70a9_52eeb1552b1c["TestPool()"]
  818171a2_dace_9e44_90ff_74756912c079 -->|method| 2b6669f0_232d_e078_70a9_52eeb1552b1c
  77ca8c04_83c5_34bd_d022_17e40d36b3cf["closeAsync()"]
  818171a2_dace_9e44_90ff_74756912c079 -->|method| 77ca8c04_83c5_34bd_d022_17e40d36b3cf

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/pool/AbstractChannelPoolMapTest.java lines 148–169

    private static final class TestPool extends SimpleChannelPool {
        private final Promise<Void> closeFuture;

        TestPool(Bootstrap bootstrap, ChannelPoolHandler handler) {
            super(bootstrap, handler);
            EventExecutor executor = bootstrap.config().group().next();
            closeFuture = executor.newPromise();
        }

        @Override
        public Future<Void> closeAsync() {
            Future<Void> poolClose = super.closeAsync();
            poolClose.addListener(future -> {
                if (future.isSuccess()) {
                    closeFuture.setSuccess(null);
                } else {
                    closeFuture.setFailure(future.cause());
                }
            });
            return poolClose;
        }
    }

Frequently Asked Questions

What is the TestPool class?
TestPool is a class in the netty codebase, defined in transport/src/test/java/io/netty/channel/pool/AbstractChannelPoolMapTest.java.
Where is TestPool defined?
TestPool is defined in transport/src/test/java/io/netty/channel/pool/AbstractChannelPoolMapTest.java at line 148.

Analyze Your Own Codebase

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

Try Supermodel Free