diff options
Diffstat (limited to 'java/ImageProcessing/framework/ServerTest.java')
-rw-r--r-- | java/ImageProcessing/framework/ServerTest.java | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/java/ImageProcessing/framework/ServerTest.java b/java/ImageProcessing/framework/ServerTest.java deleted file mode 100644 index b5ab00596ea..00000000000 --- a/java/ImageProcessing/framework/ServerTest.java +++ /dev/null @@ -1,67 +0,0 @@ -package imaging.framework; - -import java.io.*; -import java.net.*; -import JACE.OS.*; -import JACE.Connection.*; - -public class ServerTest -{ - void print_usage_and_die () - { - System.out.println ("Usage: ServerTest [<port>]"); - System.exit (0); - } - - public void init (int port) - { - try - { - Acceptor acceptor = new Acceptor (Class.forName ("imaging.framework.ServerHandler")); - acceptor.open (port); - while (true) - { - acceptor.accept (); - } - } - catch (ClassNotFoundException e) - { - ACE.ERROR (e); - } - catch (SocketException e) - { - ACE.ERROR ("Socket Exception: " + e); - } - catch (InstantiationException e) - { - ACE.ERROR (e); - } - catch (IllegalAccessException e) - { - ACE.ERROR ("Dang!" + e); - } - catch (IOException e) - { - ACE.ERROR (e); - } - } - - public static void main (String [] args) - { - int port = ACE.DEFAULT_SERVER_PORT; - ServerTest server = new ServerTest (); - - if (args.length == 1) - { - try - { - port = Integer.parseInt (args[0]); - } - catch (NumberFormatException e) - { - server.print_usage_and_die (); - } - } - server.init (port); - } -} |