FileDocCategorySizeDatePackage
ThisOrThatServerTest.javaAPI DocExample1297Wed Apr 05 11:25:42 BST 2000None

ThisOrThatServerTest

public class ThisOrThatServerTest extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

    String host = argv[0];
    String name = argv[1];
    ThisOrThatServer server = null;
    try {
      Registry rmtRegistry = LocateRegistry.getRegistry(host);
      server = (ThisOrThatServer)rmtRegistry.lookup(name);
      System.out.println(server.doThis("thing"));
      System.out.println(server.doThat("thing"));
    }
    catch (Exception e) {
      e.printStackTrace();
      System.out.println("Failed to connect to server.");
      System.out.println("Let's try again, just for laughs");
      try {
        System.out.println(server.doThis("thing"));
        System.out.println(server.doThat("thing"));
      }
      catch (Exception e2) {
        System.out.println("Nope.");
      }
    }