diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-01-01 08:00:34 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-01-01 08:00:34 +0000 |
commit | d9661aebab28abc0ec4fb1e716170d347d56c168 (patch) | |
tree | ecb671ab4b8e299bf5cbb8b2dfeed8a49b65fc06 /java/tests/Connection/AcceptorTest.java | |
parent | ea0d28240863caf437a18071bfd03e7b146c5ade (diff) | |
download | ATCD-unlabeled-4.3.2.tar.gz |
This commit was manufactured by cvs2svn to create branchunlabeled-4.3.2
'unlabeled-4.3.2'.
Diffstat (limited to 'java/tests/Connection/AcceptorTest.java')
-rw-r--r-- | java/tests/Connection/AcceptorTest.java | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/java/tests/Connection/AcceptorTest.java b/java/tests/Connection/AcceptorTest.java deleted file mode 100644 index 864a7dbe5a1..00000000000 --- a/java/tests/Connection/AcceptorTest.java +++ /dev/null @@ -1,79 +0,0 @@ -// ============================================================================ -// -// = PACKAGE -// tests.Connection -// -// = FILENAME -// AcceptorTest.java -// -// = AUTHOR -// Prashant Jain -// -// ============================================================================ -package tests.Connection; - -import java.io.*; -import java.net.*; -import ACE.OS.*; -import ACE.Connection.*; - -public class AcceptorTest -{ - void print_usage_and_die () - { - System.out.println ("Usage: test_server [<port>]"); - System.exit (0); - } - - public void init (int port) - { - try - { - Acceptor acceptor = new Acceptor (Class.forName ("tests.Connection.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; - AcceptorTest acceptorTest = new AcceptorTest (); - - if (args.length == 1) - { - try - { - port = Integer.parseInt (args[0]); - } - catch (NumberFormatException e) - { - acceptorTest.print_usage_and_die (); - } - } - acceptorTest.init (port); - } -} |