api
Interface Client2Server

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
Server

public interface Client2Server
extends java.rmi.Remote

The client's view of the server. Specifies methods for a client to submit tasks and request results.


Field Summary
static java.lang.String NAME
          The RMI registry name for the compute server.
 
Method Summary
 void putTask(Task task)
          Remote method for submitting a task to the server.
 void registerListener(RemoteListener remoteListener)
          Registers an event listener on a server
 void stop()
          Stops the server and all of its connected computers.
 java.lang.Object takeResult()
          Gets a result from the server.
 

Field Detail

NAME

static final java.lang.String NAME
The RMI registry name for the compute server.

See Also:
Constant Field Values
Method Detail

putTask

void putTask(Task task)
             throws java.rmi.RemoteException
Remote method for submitting a task to the server.

Parameters:
task - The task to be executed on a client's behalf
Throws:
java.rmi.RemoteException - RMI exception

takeResult

java.lang.Object takeResult()
                            throws java.rmi.RemoteException
Gets a result from the server. This remote method will block until a result is available.

Returns:
The result
Throws:
java.rmi.RemoteException - RMI exception

registerListener

void registerListener(RemoteListener remoteListener)
                      throws java.rmi.RemoteException
Registers an event listener on a server

Parameters:
remoteListener - the listener to register
Throws:
java.rmi.RemoteException - RMI Exception

stop

void stop()
          throws java.rmi.RemoteException
Stops the server and all of its connected computers.

Throws:
java.rmi.RemoteException - RMI Exception