Home / Function/ main() — netty Function Reference

main() — netty Function Reference

Architecture documentation for the main() function in WorldClockServer.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  393e6c8f_0f5e_bede_ef92_9827275817cb["main()"]
  41ec3cec_2d2b_d9ae_2217_4e2127ab21de["WorldClockServer"]
  393e6c8f_0f5e_bede_ef92_9827275817cb -->|defined in| 41ec3cec_2d2b_d9ae_2217_4e2127ab21de
  style 393e6c8f_0f5e_bede_ef92_9827275817cb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/worldclock/WorldClockServer.java lines 35–49

    public static void main(String[] args) throws Exception {

        EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
        try {
            ServerBootstrap b = new ServerBootstrap();
            b.group(group)
             .channel(NioServerSocketChannel.class)
             .handler(new LoggingHandler(LogLevel.INFO))
             .childHandler(new WorldClockServerInitializer(ServerUtil.buildSslContext()));

            b.bind(PORT).sync().channel().closeFuture().sync();
        } finally {
            group.shutdownGracefully();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does main() do?
main() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/worldclock/WorldClockServer.java.
Where is main() defined?
main() is defined in example/src/main/java/io/netty/example/worldclock/WorldClockServer.java at line 35.

Analyze Your Own Codebase

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

Try Supermodel Free