testHandlerRegister() — netty Function Reference
Architecture documentation for the testHandlerRegister() function in ServerBootstrapTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 9d4156da_42a4_7689_3b2f_7bb887bd014f["testHandlerRegister()"] ea70f915_ade9_644f_5c4a_f1b52d559227["ServerBootstrapTest"] 9d4156da_42a4_7689_3b2f_7bb887bd014f -->|defined in| ea70f915_ade9_644f_5c4a_f1b52d559227 style 9d4156da_42a4_7689_3b2f_7bb887bd014f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/bootstrap/ServerBootstrapTest.java lines 84–113
@Test
@Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
public void testHandlerRegister() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
EventLoopGroup group = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
try {
ServerBootstrap sb = new ServerBootstrap();
sb.channel(LocalServerChannel.class)
.group(group)
.childHandler(new ChannelInboundHandlerAdapter())
.handler(new ChannelHandlerAdapter() {
@Override
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
try {
assertTrue(ctx.executor().inEventLoop());
} catch (Throwable cause) {
error.set(cause);
} finally {
latch.countDown();
}
}
});
sb.register().syncUninterruptibly();
latch.await();
assertNull(error.get());
} finally {
group.shutdownGracefully();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testHandlerRegister() do?
testHandlerRegister() is a function in the netty codebase, defined in transport/src/test/java/io/netty/bootstrap/ServerBootstrapTest.java.
Where is testHandlerRegister() defined?
testHandlerRegister() is defined in transport/src/test/java/io/netty/bootstrap/ServerBootstrapTest.java at line 84.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free