main() — netty Function Reference
Architecture documentation for the main() function in HttpSnoopServer.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD fc6a74a5_67f8_394c_5da9_ff902e2f5bab["main()"] 0843600d_a6df_73c2_2811_7799e9a0134c["HttpSnoopServer"] fc6a74a5_67f8_394c_5da9_ff902e2f5bab -->|defined in| 0843600d_a6df_73c2_2811_7799e9a0134c style fc6a74a5_67f8_394c_5da9_ff902e2f5bab fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
example/src/main/java/io/netty/example/http/snoop/HttpSnoopServer.java lines 38–60
public static void main(String[] args) throws Exception {
// Configure SSL.
final SslContext sslCtx = ServerUtil.buildSslContext();
// Configure the server.
EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
try {
ServerBootstrap b = new ServerBootstrap();
b.group(group)
.channel(NioServerSocketChannel.class)
.handler(new LoggingHandler(LogLevel.INFO))
.childHandler(new HttpSnoopServerInitializer(sslCtx));
Channel ch = b.bind(PORT).sync().channel();
System.err.println("Open your web browser and navigate to " +
(SSL? "https" : "http") + "://127.0.0.1:" + PORT + '/');
ch.closeFuture().sync();
} 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/http/snoop/HttpSnoopServer.java.
Where is main() defined?
main() is defined in example/src/main/java/io/netty/example/http/snoop/HttpSnoopServer.java at line 38.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free