Home / Class/ ClientHandler Class — netty Architecture

ClientHandler Class — netty Architecture

Architecture documentation for the ClientHandler class in UDTClientServerConnectionTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7b1e9cd9_92b3_cb55_12c7_64bd16e9d458["ClientHandler"]
  f3540ce4_30eb_36e3_f952_e84f7d4af406["UDTClientServerConnectionTest.java"]
  7b1e9cd9_92b3_cb55_12c7_64bd16e9d458 -->|defined in| f3540ce4_30eb_36e3_f952_e84f7d4af406
  88f72f24_820c_65dd_9109_4838b101da3b["channelActive()"]
  7b1e9cd9_92b3_cb55_12c7_64bd16e9d458 -->|method| 88f72f24_820c_65dd_9109_4838b101da3b
  93b6375c_84e6_973b_6d7f_b093d91638f8["channelInactive()"]
  7b1e9cd9_92b3_cb55_12c7_64bd16e9d458 -->|method| 93b6375c_84e6_973b_6d7f_b093d91638f8
  4630606c_7ed5_66ed_2894_81564a3800f5["exceptionCaught()"]
  7b1e9cd9_92b3_cb55_12c7_64bd16e9d458 -->|method| 4630606c_7ed5_66ed_2894_81564a3800f5
  2f6b6931_e3e8_f6b6_d693_2b8ac0dabf13["channelRead0()"]
  7b1e9cd9_92b3_cb55_12c7_64bd16e9d458 -->|method| 2f6b6931_e3e8_f6b6_d693_2b8ac0dabf13

Relationship Graph

Source Code

testsuite/src/main/java/io/netty/testsuite/transport/udt/UDTClientServerConnectionTest.java lines 147–180

    static class ClientHandler extends SimpleChannelInboundHandler<Object> {

        static final Logger log = LoggerFactory.getLogger(ClientHandler.class);

        volatile boolean isActive;

        @Override
        public void channelActive(final ChannelHandlerContext ctx)
                throws Exception {
            isActive = true;
            log.info("Client active {}", ctx.channel());
            super.channelActive(ctx);
        }

        @Override
        public void channelInactive(final ChannelHandlerContext ctx)
                throws Exception {
            isActive = false;
            log.info("Client inactive {}", ctx.channel());
            super.channelInactive(ctx);
        }

        @Override
        public void exceptionCaught(final ChannelHandlerContext ctx,
                final Throwable cause) throws Exception {
            log.warn("Client unexpected exception from downstream.", cause);
            ctx.close();
        }

        @Override
        public void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception {
            log.info("Client received: " + msg);
        }
    }

Frequently Asked Questions

What is the ClientHandler class?
ClientHandler is a class in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/udt/UDTClientServerConnectionTest.java.
Where is ClientHandler defined?
ClientHandler is defined in testsuite/src/main/java/io/netty/testsuite/transport/udt/UDTClientServerConnectionTest.java at line 147.

Analyze Your Own Codebase

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

Try Supermodel Free