EchoClientHandler Class — netty Architecture
Architecture documentation for the EchoClientHandler class in SocketSslEchoTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 61b39b16_9a10_b838_38b8_fd3f3598cee4["EchoClientHandler"] 34cf25cc_6ea4_21b4_4971_fbf3fd40752e["SocketSslEchoTest.java"] 61b39b16_9a10_b838_38b8_fd3f3598cee4 -->|defined in| 34cf25cc_6ea4_21b4_4971_fbf3fd40752e a04ef6e5_06fb_4b60_d937_93878a281d7e["EchoClientHandler()"] 61b39b16_9a10_b838_38b8_fd3f3598cee4 -->|method| a04ef6e5_06fb_4b60_d937_93878a281d7e 62b5d936_c526_c953_85fa_34ac100aa5a2["handlerAdded()"] 61b39b16_9a10_b838_38b8_fd3f3598cee4 -->|method| 62b5d936_c526_c953_85fa_34ac100aa5a2 1760f8cb_e381_5129_4d24_fb1c47a9bc79["channelRead0()"] 61b39b16_9a10_b838_38b8_fd3f3598cee4 -->|method| 1760f8cb_e381_5129_4d24_fb1c47a9bc79
Relationship Graph
Source Code
testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketSslEchoTest.java lines 506–534
private class EchoClientHandler extends EchoHandler {
EchoClientHandler(
AtomicInteger recvCounter, AtomicInteger negoCounter,
AtomicReference<Throwable> exception) {
super(recvCounter, negoCounter, exception);
}
@Override
public void handlerAdded(final ChannelHandlerContext ctx) {
if (!autoRead) {
ctx.pipeline().get(SslHandler.class).handshakeFuture().addListener(future -> ctx.read());
}
}
@Override
public void channelRead0(ChannelHandlerContext ctx, ByteBuf in) throws Exception {
byte[] actual = new byte[in.readableBytes()];
in.readBytes(actual);
int lastIdx = recvCounter.get();
for (int i = 0; i < actual.length; i ++) {
assertEquals(data[i + lastIdx], actual[i]);
}
recvCounter.addAndGet(actual.length);
}
}
Source
Frequently Asked Questions
What is the EchoClientHandler class?
EchoClientHandler is a class in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketSslEchoTest.java.
Where is EchoClientHandler defined?
EchoClientHandler is defined in testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketSslEchoTest.java at line 506.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free