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 | 437eea6fa08e931864f89be91d14a816f69075c7 (patch) | |
tree | b8c1fd723fdcd61c3855d3a3a21a9cd45a268219 /java/tests/Connection/ConnectorTest.java | |
parent | ea0d28240863caf437a18071bfd03e7b146c5ade (diff) | |
download | ATCD-unlabeled-4.2.2.tar.gz |
This commit was manufactured by cvs2svn to create branchunlabeled-4.2.2
'unlabeled-4.2.2'.
Diffstat (limited to 'java/tests/Connection/ConnectorTest.java')
-rw-r--r-- | java/tests/Connection/ConnectorTest.java | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/java/tests/Connection/ConnectorTest.java b/java/tests/Connection/ConnectorTest.java deleted file mode 100644 index d3722b768ea..00000000000 --- a/java/tests/Connection/ConnectorTest.java +++ /dev/null @@ -1,76 +0,0 @@ -// ============================================================================ -// -// = PACKAGE -// tests.Connection -// -// = FILENAME -// ConnectorTest.java -// -// = AUTHOR -// Prashant Jain -// -// ============================================================================ -package tests.Connection; - -import java.io.*; -import java.net.*; -import ACE.OS.*; -import ACE.Connection.*; - -public class ConnectorTest -{ - void print_usage_and_die () - { - System.out.println ("Usage: test_Connector <hostname> [<port>]"); - System.exit (0); - } - - public void init (String hostname, int port) - { - try - { - Connector connector = new Connector (); - connector.open (hostname, port); - connector.connect (new ClientHandler ()); - } - catch (UnknownHostException e) - { - ACE.ERROR (e); - } - catch (SocketException e) - { - ACE.ERROR ("Connection refused"); - } - catch (InstantiationException e) - { - ACE.ERROR (e); - } - catch (IllegalAccessException e) - { - ACE.ERROR (e); - } - catch (IOException e) - { - ACE.ERROR (e); - } - } - - public static void main (String [] args) - { - int port = ACE.DEFAULT_SERVER_PORT; - ConnectorTest connectorTest = new ConnectorTest (); - - if (args.length == 2) - { - try - { - port = Integer.parseInt (args[1]); - } - catch (NumberFormatException e) - { - connectorTest.print_usage_and_die (); - } - } - connectorTest.init (args[0], port); - } -} |