com.sun.jini.example.cancellation
Class Client

java.lang.Object
  extended bycom.sun.jini.example.cancellation.Client
All Implemented Interfaces:
ReceiveReady, java.rmi.Remote

public class Client
extends java.lang.Object
implements ReceiveReady

Defines a client application that spawns a thread to invoke the Ping.ping remote method on a server and then cancels the remote call in progress in that thread. The client passes the ping method a callback object implementing the ReceiveReady interface that is executing in the client. The server's ping method notifies the client that the method is executing by calling the callback object's ready method. When the ready method is invoked by the server, the client cancels the ping remote call.

The application uses the following system properties:

config
The argument passed to Configuration.Provider.get to create the configuration used by the application. If not set, the value null will be used.
serverHost
The name of the host running the server; defaults to the local host.
The application uses the following configuration entries:
client (type Exporter, no default)
the exporter used for the client callback object.
The application looks for a proxy that implements the Ping interface under the name "com.sun.jini.example.cancellation.Ping" in the registry running on the server host.

Author:
Sun Microsystems, Inc.

Constructor Summary
Client()
           
 
Method Summary
static void main(java.lang.String[] args)
          Starts an application that spawns a thread to a call to a remote method Ping.ping method and cancels the remote call executing in that thread.
 void ready()
          Notifies the signal that the client has been called back by the server's ping method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client()
Method Detail

ready

public void ready()
Notifies the signal that the client has been called back by the server's ping method.

Specified by:
ready in interface ReceiveReady

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Starts an application that spawns a thread to a call to a remote method Ping.ping method and cancels the remote call executing in that thread.

Parameters:
args - ignored
Throws:
java.lang.Exception - if something bad happens


Copyright © 2003 Sun Microsystems, Inc. All Rights Reserved.