ExceptionHandler Class — netty Architecture
Architecture documentation for the ExceptionHandler class in SocketExceptionHandlingTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 55df77ee_4db0_d9c6_b8cf_d54ae19a00d3["ExceptionHandler"] 9fd334be_c250_b631_d5f7_d0a51c6c89cc["SocketExceptionHandlingTest.java"] 55df77ee_4db0_d9c6_b8cf_d54ae19a00d3 -->|defined in| 9fd334be_c250_b631_d5f7_d0a51c6c89cc 77ee14d0_10f6_6cc7_f404_fd7fb988e93f["exceptionCaught()"] 55df77ee_4db0_d9c6_b8cf_d54ae19a00d3 -->|method| 77ee14d0_10f6_6cc7_f404_fd7fb988e93f
Relationship Graph
Source Code
testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketExceptionHandlingTest.java lines 100–118
private static class ExceptionHandler extends ChannelInboundHandlerAdapter {
final AtomicLong count = new AtomicLong();
/**
* We expect to get 1 call to {@link #exceptionCaught(ChannelHandlerContext, Throwable)}.
*/
final CountDownLatch latch1 = new CountDownLatch(1);
final CountDownLatch latch2 = new CountDownLatch(1);
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
if (count.incrementAndGet() <= 2) {
latch1.countDown();
} else {
latch2.countDown();
}
// This should not throw any exception.
ctx.close();
}
}
Defined In
Source
Frequently Asked Questions
What is the ExceptionHandler class?
ExceptionHandler is a class in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketExceptionHandlingTest.java.
Where is ExceptionHandler defined?
ExceptionHandler is defined in testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketExceptionHandlingTest.java at line 100.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free