Home / Class/ CheckExceptionHandler Class — netty Architecture

CheckExceptionHandler Class — netty Architecture

Architecture documentation for the CheckExceptionHandler class in DefaultChannelPipelineTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  b08daeb8_d029_f274_63d8_545f80077e76["CheckExceptionHandler"]
  ded22145_bbcf_15a1_69b7_30cac8d4be02["DefaultChannelPipelineTest.java"]
  b08daeb8_d029_f274_63d8_545f80077e76 -->|defined in| ded22145_bbcf_15a1_69b7_30cac8d4be02
  0583b801_5c23_7c01_232e_535f987f04c2["CheckExceptionHandler()"]
  b08daeb8_d029_f274_63d8_545f80077e76 -->|method| 0583b801_5c23_7c01_232e_535f987f04c2
  8cc8db80_1351_a29e_2e96_366cd0b6b11d["exceptionCaught()"]
  b08daeb8_d029_f274_63d8_545f80077e76 -->|method| 8cc8db80_1351_a29e_2e96_366cd0b6b11d

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java lines 2285–2302

    private static final class CheckExceptionHandler extends ChannelInboundHandlerAdapter {
        private final Throwable expected;
        private final Promise<Void> promise;

        CheckExceptionHandler(Throwable expected, Promise<Void> promise) {
            this.expected = expected;
            this.promise = promise;
        }

        @Override
        public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
            if (cause instanceof ChannelPipelineException && cause.getCause() == expected) {
                promise.setSuccess(null);
            } else {
                promise.setFailure(new AssertionError("cause not the expected instance"));
            }
        }
    }

Frequently Asked Questions

What is the CheckExceptionHandler class?
CheckExceptionHandler is a class in the netty codebase, defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java.
Where is CheckExceptionHandler defined?
CheckExceptionHandler is defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java at line 2285.

Analyze Your Own Codebase

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

Try Supermodel Free