Home / Class/ AutobahnServer Class — netty Architecture

AutobahnServer Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  c8849536_a67f_0799_3c1a_c71e4ec6d145["AutobahnServer"]
  690366a6_43f5_6fdb_a261_3b2a2379fb3e["AutobahnServer.java"]
  c8849536_a67f_0799_3c1a_c71e4ec6d145 -->|defined in| 690366a6_43f5_6fdb_a261_3b2a2379fb3e
  2a3a197f_acf6_ff57_ed27_be6caf09231c["AutobahnServer()"]
  c8849536_a67f_0799_3c1a_c71e4ec6d145 -->|method| 2a3a197f_acf6_ff57_ed27_be6caf09231c
  372c8382_5835_52eb_dfa8_f1feffe27f33["run()"]
  c8849536_a67f_0799_3c1a_c71e4ec6d145 -->|method| 372c8382_5835_52eb_dfa8_f1feffe27f33
  bb53466f_7329_2040_7331_e79c89b0faf2["main()"]
  c8849536_a67f_0799_3c1a_c71e4ec6d145 -->|method| bb53466f_7329_2040_7331_e79c89b0faf2

Relationship Graph

Source Code

testsuite-autobahn/src/main/java/io/netty/testsuite/autobahn/AutobahnServer.java lines 31–65

public class AutobahnServer {

    private final int port;

    public AutobahnServer(int port) {
        this.port = port;
    }

    public void run() throws Exception {
        EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
        try {
            ServerBootstrap b = new ServerBootstrap();
            b.group(group)
             .channel(NioServerSocketChannel.class)
             .childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT)
             .childHandler(new AutobahnServerInitializer());

            ChannelFuture f = b.bind(port).sync();
            System.out.println("Web Socket Server started at port " + port);
            f.channel().closeFuture().sync();
        } finally {
            group.shutdownGracefully();
        }
    }

    public static void main(String[] args) throws Exception {
        int port;
        if (args.length > 0) {
            port = Integer.parseInt(args[0]);
        } else {
            port = 9000;
        }
        new AutobahnServer(port).run();
    }
}

Frequently Asked Questions

What is the AutobahnServer class?
AutobahnServer is a class in the netty codebase, defined in testsuite-autobahn/src/main/java/io/netty/testsuite/autobahn/AutobahnServer.java.
Where is AutobahnServer defined?
AutobahnServer is defined in testsuite-autobahn/src/main/java/io/netty/testsuite/autobahn/AutobahnServer.java at line 31.

Analyze Your Own Codebase

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

Try Supermodel Free