Home / Class/ HttpUploadServer Class — netty Architecture

HttpUploadServer Class — netty Architecture

Architecture documentation for the HttpUploadServer class in HttpUploadServer.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  29f1261e_623d_c1f6_c5bd_2816cc755df7["HttpUploadServer"]
  d5b0eb25_5561_e6f5_b370_96d2be1870e8["HttpUploadServer.java"]
  29f1261e_623d_c1f6_c5bd_2816cc755df7 -->|defined in| d5b0eb25_5561_e6f5_b370_96d2be1870e8
  f6add856_96b3_d714_5788_5f2ae77351bb["main()"]
  29f1261e_623d_c1f6_c5bd_2816cc755df7 -->|method| f6add856_96b3_d714_5788_5f2ae77351bb

Relationship Graph

Source Code

example/src/main/java/io/netty/example/http/upload/HttpUploadServer.java lines 32–59

public final class HttpUploadServer {

    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();

        EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
        try {
            ServerBootstrap b = new ServerBootstrap();
            b.group(group);
            b.channel(NioServerSocketChannel.class);
            b.handler(new LoggingHandler(LogLevel.INFO));
            b.childHandler(new HttpUploadServerInitializer(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();
        }
    }
}

Frequently Asked Questions

What is the HttpUploadServer class?
HttpUploadServer is a class in the netty codebase, defined in example/src/main/java/io/netty/example/http/upload/HttpUploadServer.java.
Where is HttpUploadServer defined?
HttpUploadServer is defined in example/src/main/java/io/netty/example/http/upload/HttpUploadServer.java at line 32.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free