FileDocCategorySizeDatePackage
MyClientAsync.javaAPI DocExample947Sat Apr 23 22:35:38 BST 2005None

MyClientAsync

public class MyClientAsync extends UnicastRemoteObject implements WorkListener

Fields Summary
Constructors Summary
public MyClientAsync(String host)

        try {
            RemoteServer server = (RemoteServer)
                Naming.lookup("rmi://"+host+"/NiftyServer");

			server.asyncExecute( new MyCalculation(100), this );
			System.out.println("call done...");
        } catch (java.io.IOException e) {
			System.out.println(e);
            // I/O Error or bad URL
        } catch (NotBoundException e) {
			System.out.println(e);
            // NiftyServer isn't registered
        }
    
Methods Summary
public static voidmain(java.lang.String[] args)

        new MyClientAsync( args[0] );
    
public voidworkCompleted(WorkRequest request, java.lang.Object result)

		System.out.println("Async result: "+result );