public interface ICompute
extends java.rmi.Remote
A generalized compute engine object that will execute a given ITask object and return the result. A compute engine IS an RMI Server object and is itself, NOT transmitted to anyone. ONLY the STUB of this Remote object is ever transmitted. This interface ONLY defines the methods needed by a REMOTE system!
Note that an implementation of this interface may include additional methods to enable the compute engine to interact with the local system as well as adapter(s) as needed to communicate with the LOCAL system's model and/or view.
Any ICompute implementation MUST be able to:
- Display the ITask computation's results on the Engine system's user interface
- Enable the Engine system to be able to send a text message to the client's user interface.
IMPORTANT: The engine model is NOT the same as the compute engine!! The compute engine (this interface) is just one of the objects managed by the engine model.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BOUND_NAME
The name the ICompute object will be bound to in the RMI Registry
|
static int |
BOUND_PORT
The port that the client will use to communicate with the ICompute object
Note that this port must be opened of inbound traffic on the server machine
|
Modifier and Type | Method and Description |
---|---|
<T> T |
executeTask(ITask<T> t)
Execute the given ITask object and return the result
|
IRemoteTaskViewAdapter |
setTextAdapter(IRemoteTaskViewAdapter clientTVAStub)
Sets this object's IRemoteTaskViewAdapter stub so that it can print strings out on the client's user interface.
|
static final java.lang.String BOUND_NAME
static final int BOUND_PORT
<T> T executeTask(ITask<T> t) throws java.rmi.RemoteException
T
- The type of the return value from executing the given ITask objectt
- The ITask object to executejava.rmi.RemoteException
- if a network error occursIRemoteTaskViewAdapter setTextAdapter(IRemoteTaskViewAdapter clientTVAStub) throws java.rmi.RemoteException
clientTVA
- the task view adapter STUB to for the server to use.java.rmi.RemoteException
- if a network error occurs.