|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--com.sun.grid.ComputeEngineImpl
This class is a dummy implementation of the ComputeEngine interface used to generate stub and skeleton classes. The functionality of this class is actually performed by the ComputeProxy class.
Field Summary |
Fields inherited from class java.rmi.server.UnicastRemoteObject |
|
Fields inherited from class java.rmi.server.RemoteServer |
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
ComputeEngineImpl()
Constructs ComputeEngineImpl object and exports it on default port. |
|
ComputeEngineImpl(int port)
Constructs ComputeEngineImpl object and exports it on specified port. |
Method Summary | |
java.io.Serializable |
compute(Computable job)
This method submits a job for synchrnous execution. |
java.lang.String |
computeAsynch(Computable job)
This method submits a job for asynchrnous execution. |
java.io.Serializable |
getResults(java.lang.String jobId)
This method retrieves the results of a job that was executed asynchronously. |
boolean |
isComplete(java.lang.String jobId)
This method check whether an asynchronous job has finished executing. |
static void |
main(java.lang.String[] args)
Main method. |
static void |
registerToRegistry(java.lang.String name,
java.rmi.Remote obj,
boolean create)
Register ComputeEngineImpl object with the RMI registry. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ComputeEngineImpl() throws java.rmi.RemoteException
public ComputeEngineImpl(int port) throws java.rmi.RemoteException
port
- The port for exportingMethod Detail |
public static void registerToRegistry(java.lang.String name, java.rmi.Remote obj, boolean create) throws java.rmi.RemoteException, java.net.MalformedURLException
obj
- the object to bindname
- - name identifying the service in the RMI registrycreate
- - create local registry if necessary
java.rmi.RemoteException
- if cannot be exported or bound to RMI registry
java.net.MalformedURLException
- if name cannot be used to construct a valid URL
java.lang.IllegalArgumentException
- if null passed as namepublic static void main(java.lang.String[] args)
args
- public java.io.Serializable compute(Computable job) throws java.rmi.RemoteException, ComputeException
compute
in interface ComputeEngine
job
- the job to be executed
java.rmi.RemoteException
- if an error occurs on the server side
ComputeException
- if an error occurs during job executionpublic java.lang.String computeAsynch(Computable job) throws java.rmi.RemoteException, ComputeException
computeAsynch
in interface ComputeEngine
job
- the job to be executed
java.rmi.RemoteException
- if an error occurs on the server side
ComputeException
- if an error occurs during job executionpublic java.io.Serializable getResults(java.lang.String jobId) throws java.rmi.RemoteException, ComputeException
getResults
in interface ComputeEngine
jobId
- the id of the job
java.rmi.RemoteException
- if an error occurs on the server side
ComputeException
- if an error occurs during job executionpublic boolean isComplete(java.lang.String jobId) throws java.rmi.RemoteException, ComputeException
isComplete
in interface ComputeEngine
jobId
- the id of the job
java.rmi.RemoteException
- if an error occurs on the server side
ComputeException
- if an error occurs during job execution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |