main() — netty Function Reference
Architecture documentation for the main() function in HttpStaticFileServer.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 84948096_cfad_8f5d_517c_f2d313ef3783["main()"] 885a0903_479e_ae6f_81ca_40afa13dd2d1["HttpStaticFileServer"] 84948096_cfad_8f5d_517c_f2d313ef3783 -->|defined in| 885a0903_479e_ae6f_81ca_40afa13dd2d1 style 84948096_cfad_8f5d_517c_f2d313ef3783 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
example/src/main/java/io/netty/example/http/file/HttpStaticFileServer.java lines 34–55
public static void main(String[] args) throws Exception {
// Configure SSL.
final SslContext sslCtx = ServerUtil.buildSslContext();
EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
try {
ServerBootstrap b = new ServerBootstrap();
b.group(group)
.channel(NioServerSocketChannel.class)
.handler(new LoggingHandler(LogLevel.INFO))
.childHandler(new HttpStaticFileServerInitializer(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/file/HttpStaticFileServer.java.
Where is main() defined?
main() is defined in example/src/main/java/io/netty/example/http/file/HttpStaticFileServer.java at line 34.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free