edu.ucsb.cs.jicos.foundation
Interface Service

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
Host, HostExternal, HostMatlab, edu.ucsb.cs.jicos.foundation.ServiceImpl, edu.ucsb.cs.jicos.services.TaskServer, TaskServerExternal, TaskServerMatlab

public interface Service
extends java.rmi.Remote


Field Summary
static java.lang.String NAME
          The name of the Service that is put in the RMIRegistry.
 
Method Summary
 java.lang.Object executeCommand(Service sender, edu.ucsb.cs.jicos.foundation.CommandSynchronous command)
          A Remote method for synchronously executing a Command.
 void receiveCommands(Service sender, java.util.List commandQ)
          accepts a marshalled list of Commands that are being sent by another Service.
 

Field Detail

NAME

static final java.lang.String NAME
The name of the Service that is put in the RMIRegistry.

See Also:
Constant Field Values
Method Detail

receiveCommands

void receiveCommands(Service sender,
                     java.util.List commandQ)
                     throws java.rmi.RemoteException
accepts a marshalled list of Commands that are being sent by another Service. This method is public only because it is a Remote method: It is internal to the foundation package. It distributes each Command object to its appropriate Department. Commands destined for the "ASAP_DEPARTMENT" are executed directly.

Parameters:
sender - The sending service.
commandQ - a marshalled LinkedList of Command objects.
Throws:
java.rmi.RemoteException - This is a Remote method.

executeCommand

java.lang.Object executeCommand(Service sender,
                                edu.ucsb.cs.jicos.foundation.CommandSynchronous command)
                                throws java.rmi.RemoteException
A Remote method for synchronously executing a Command.

Parameters:
sender - The sending service.
command - the Command object to sent for remote execution.
Returns:
the Object that is the return value of the Command's execute method. The actual type of the object returned depends on the actual Command.
Throws:
java.rmi.RemoteException - This is a Remote method.


Jicos: http://cs.ucsb.edu/projects/jicos