main() — netty Function Reference
Architecture documentation for the main() function in FactorialClient.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0544e424_04a2_5fc6_e8e5_0ce640494bb7["main()"] fddf5e55_7d11_7a99_f8da_5cedf4577068["FactorialClient"] 0544e424_04a2_5fc6_e8e5_0ce640494bb7 -->|defined in| fddf5e55_7d11_7a99_f8da_5cedf4577068 style 0544e424_04a2_5fc6_e8e5_0ce640494bb7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
example/src/main/java/io/netty/example/factorial/FactorialClient.java lines 37–60
public static void main(String[] args) throws Exception {
// Configure SSL.
final SslContext sslCtx = ServerUtil.buildSslContext();
EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
try {
Bootstrap b = new Bootstrap();
b.group(group)
.channel(NioSocketChannel.class)
.handler(new FactorialClientInitializer(sslCtx));
// Make a new connection.
ChannelFuture f = b.connect(HOST, PORT).sync();
// Get the handler instance to retrieve the answer.
FactorialClientHandler handler =
(FactorialClientHandler) f.channel().pipeline().last();
// Print out the answer.
System.err.format("Factorial of %,d is: %,d", COUNT, handler.getFactorial());
} finally {
group.shutdownGracefully();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does main() do?
main() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/factorial/FactorialClient.java.
Where is main() defined?
main() is defined in example/src/main/java/io/netty/example/factorial/FactorialClient.java at line 37.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free