summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/dnbd3/status/App.java
blob: 5c51e7a5f88e07e6b71d7019d35ef42e178f6c47 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package org.openslx.dnbd3.status;

import java.io.IOException;
import java.util.Arrays;

public class App
{

	public static void main( String[] args ) throws IOException
	{
		if ( args.length < 1 ) {
			System.err.println( "Missing arguments\nUsage: tool <port> <server1> <server2> ... <serverN>" );
			System.exit( 1 );
		}
		int port = Integer.parseInt( args[0] );
		String[] servers = Arrays.copyOfRange( args, 0, args.length );
		System.setProperty( "com.example.jndi.dns.timeout.initial", "400" );
		System.setProperty( "com.example.jndi.dns.timeout.retries", "2" );
		WebServer ws = new WebServer( port, servers );
		ws.run();
	}

}