HttpHelloWorldServer Class — netty Architecture
Architecture documentation for the HttpHelloWorldServer class in HttpHelloWorldServer.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 500d472a_27cc_13c2_b991_f973707309a4["HttpHelloWorldServer"] 10c1fe6d_3e09_738c_7f6c_56443cc9b412["HttpHelloWorldServer.java"] 500d472a_27cc_13c2_b991_f973707309a4 -->|defined in| 10c1fe6d_3e09_738c_7f6c_56443cc9b412 0e6a82f4_f397_b7b0_efef_6559f4459ead["main()"] 500d472a_27cc_13c2_b991_f973707309a4 -->|method| 0e6a82f4_f397_b7b0_efef_6559f4459ead
Relationship Graph
Source Code
example/src/main/java/io/netty/example/http/helloworld/HttpHelloWorldServer.java lines 34–63
public final class HttpHelloWorldServer {
static final boolean SSL = System.getProperty("ssl") != null;
static final int PORT = Integer.parseInt(System.getProperty("port", SSL? "8443" : "8080"));
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.option(ChannelOption.SO_BACKLOG, 1024);
b.group(group)
.channel(NioServerSocketChannel.class)
.handler(new LoggingHandler(LogLevel.INFO))
.childHandler(new HttpHelloWorldServerInitializer(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();
}
}
}
Source
Frequently Asked Questions
What is the HttpHelloWorldServer class?
HttpHelloWorldServer is a class in the netty codebase, defined in example/src/main/java/io/netty/example/http/helloworld/HttpHelloWorldServer.java.
Where is HttpHelloWorldServer defined?
HttpHelloWorldServer is defined in example/src/main/java/io/netty/example/http/helloworld/HttpHelloWorldServer.java at line 34.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free