ByteEchoClient Class — netty Architecture
Architecture documentation for the ByteEchoClient class in ByteEchoClient.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 4728a667_2a29_5d5c_bb4b_11023c4390de["ByteEchoClient"] aca2695f_07cd_789c_00d6_7f8694825ff2["ByteEchoClient.java"] 4728a667_2a29_5d5c_bb4b_11023c4390de -->|defined in| aca2695f_07cd_789c_00d6_7f8694825ff2 d6b28235_0266_ff7c_f87b_513098cfcebb["main()"] 4728a667_2a29_5d5c_bb4b_11023c4390de -->|method| d6b28235_0266_ff7c_f87b_513098cfcebb
Relationship Graph
Source Code
example/src/main/java/io/netty/example/udt/echo/bytes/ByteEchoClient.java lines 40–73
public final class ByteEchoClient {
static final String HOST = System.getProperty("host", "127.0.0.1");
static final int PORT = Integer.parseInt(System.getProperty("port", "8007"));
static final int SIZE = Integer.parseInt(System.getProperty("size", "256"));
public static void main(String[] args) throws Exception {
// Configure the client.
final ThreadFactory connectFactory = new DefaultThreadFactory("connect");
final EventLoopGroup connectGroup = new MultiThreadIoEventLoopGroup(1,
connectFactory, NioIoHandler.newFactory(NioUdtProvider.BYTE_PROVIDER));
try {
final Bootstrap boot = new Bootstrap();
boot.group(connectGroup)
.channelFactory(NioUdtProvider.BYTE_CONNECTOR)
.handler(new ChannelInitializer<UdtChannel>() {
@Override
public void initChannel(final UdtChannel ch)
throws Exception {
ch.pipeline().addLast(
new LoggingHandler(LogLevel.INFO),
new ByteEchoClientHandler());
}
});
// Start the client.
final ChannelFuture f = boot.connect(HOST, PORT).sync();
// Wait until the connection is closed.
f.channel().closeFuture().sync();
} finally {
// Shut down the event loop to terminate all threads.
connectGroup.shutdownGracefully();
}
}
}
Source
Frequently Asked Questions
What is the ByteEchoClient class?
ByteEchoClient is a class in the netty codebase, defined in example/src/main/java/io/netty/example/udt/echo/bytes/ByteEchoClient.java.
Where is ByteEchoClient defined?
ByteEchoClient is defined in example/src/main/java/io/netty/example/udt/echo/bytes/ByteEchoClient.java at line 40.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free