src/main/java/com/io7m/aeron_guide/take3/AeronMessagingServer.java
/**
     * Command-line entry point.
     *
     * @param args Command-line arguments
     *
     * @throws Exception On any error
     */
Command-line entry point.
@param args Command-line arguments

@throws Exception On any error
Command - line entry point . @param args Command - line arguments @throws Exception On any error
public static void main(
            final String[] args)
            throws Exception {
        if (args.length < 6) {
            LOG.error(
                    "usage: directory local-address local-initial-data-port local-initial-control-port local-clients-base-port client-count");
            System.exit(1);
        }
        final Path directory = Paths.get(args[0]);
        final InetAddress local_address = InetAddress.getByName(args[1]);
        final int local_initial_data_port = Integer.parseUnsignedInt(args[2]);
        final int local_initial_control_port = Integer.parseUnsignedInt(args[3]);
        final int local_clients_base_port = Integer.parseUnsignedInt(args[4]);
        final int client_count = Integer.parseUnsignedInt(args[5]);
        final AeronMessagingServerConfiguration config
                = ImmutableAeronMessagingServerConfiguration.builder()
                        .baseDirectory(directory)
                        .localAddress(local_address)
                        .localInitialPort(local_initial_data_port)
                        .localInitialControlPort(local_initial_control_port)
                        .localClientsBasePort(local_clients_base_port)
                        .clientMaximumCount(client_count)
                        .maximumConnectionsPerAddress(3)
                        .build();
        try (final AeronMessagingServer server = create(Clock.systemUTC(), config)) {
            server.run();
        }
    }
public static void main ( final String [ ] args ) throws Exception { if ( args . length < 6 ) { LOG . error ( "usage: directory local-address local-initial-data-port local-initial-control-port local-clients-base-port client-count" ) ; System . exit ( 1 ) ; } final Path directory = Paths . get ( args [ 0 ] ) ; final InetAddress local_address = InetAddress . getByName ( args [ 1 ] ) ; final int local_initial_data_port = Integer . parseUnsignedInt ( args [ 2 ] ) ; final int local_initial_control_port = Integer . parseUnsignedInt ( args [ 3 ] ) ; final int local_clients_base_port = Integer . parseUnsignedInt ( args [ 4 ] ) ; final int client_count = Integer . parseUnsignedInt ( args [ 5 ] ) ; final AeronMessagingServerConfiguration config = ImmutableAeronMessagingServerConfiguration . builder ( ) . baseDirectory ( directory ) . localAddress ( local_address ) . localInitialPort ( local_initial_data_port ) . localInitialControlPort ( local_initial_control_port ) . localClientsBasePort ( local_clients_base_port ) . clientMaximumCount ( client_count ) . maximumConnectionsPerAddress ( 3 ) . build ( ) ; try ( final AeronMessagingServer server = create ( Clock . systemUTC ( ) , config ) ) { server . run ( ) ; } }
Command-line entry point.
Command - line entry point .