summaryrefslogtreecommitdiff
path: root/java/JACE/tests/Connection/ConnectorTest.java
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-08-27 18:14:04 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-08-27 18:14:04 +0000
commit6c13de310492e31ede379bb04df1c62cbdb4b09f (patch)
treee97ae496cdcdecfec591b74ea60dde5ceb33d32a /java/JACE/tests/Connection/ConnectorTest.java
parentb5e068afb139dc7c6b9cf90c53571a4333105c95 (diff)
downloadATCD-pre_dynamic_any.tar.gz
This commit was manufactured by cvs2svn to create tagpre_dynamic_any
'pre_dynamic_any'.
Diffstat (limited to 'java/JACE/tests/Connection/ConnectorTest.java')
-rw-r--r--java/JACE/tests/Connection/ConnectorTest.java78
1 files changed, 0 insertions, 78 deletions
diff --git a/java/JACE/tests/Connection/ConnectorTest.java b/java/JACE/tests/Connection/ConnectorTest.java
deleted file mode 100644
index 285e492dcaf..00000000000
--- a/java/JACE/tests/Connection/ConnectorTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// ============================================================================
-//
-// = PACKAGE
-// tests.Connection
-//
-// = FILENAME
-// ConnectorTest.java
-//
-// = AUTHOR
-// Prashant Jain
-//
-// ============================================================================
-package JACE.tests.Connection;
-
-import java.io.*;
-import java.net.*;
-import JACE.OS.*;
-import JACE.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 ();
-
- ACE.enableDebugging ();
-
- if (args.length == 2)
- {
- try
- {
- port = Integer.parseInt (args[1]);
- }
- catch (NumberFormatException e)
- {
- connectorTest.print_usage_and_die ();
- }
- }
- connectorTest.init (args[0], port);
- }
-}