|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UIManager
Interface of Mygrid API.
To use the API, applications must add ourgrid.jar to their classpath. The application command line must include a definition to the MGROOT variable (i.e. add -DMGROOT=/mygrid/installation/directory to the Java VM command line).
Before calling methods, an application must obtain a reference to Mygrid's UI
Manager by calling MyGridUIManager.getInstance()
Method Summary | |
---|---|
int |
addJob(JobSpec theJob)
Adds a job to be executed by Mygrid. |
int |
addJob(java.lang.String descriptionFilePath)
Deprecated. |
void |
cancelJob(int jobId)
Asks Mygrid to cancel a job |
void |
cleanFinishedJobs()
Erases all jobs that are not running anymore |
java.util.Collection<GridManagerEntry> |
getGumEntries(GridManagerListenerRemote newListener)
Obtains a collection with the gums that are currently in use by Mygrid. |
java.util.Collection<GumSpec> |
getGumSpecs()
Obtains a collection with the gums that are currently in use by Mygrid |
java.util.Collection<JobEntry> |
getJobs(JobManagerListenerRemote newListener)
Obtains a collection with the jobs that are currently added to Mygrid, no matter the jobs states. |
java.util.Collection<PeerEntry> |
getPeerEntries(GridManagerListenerRemote newListener)
Obtains a collection with the peers that are currently set on Mygrid. |
boolean |
isMyGridRunning()
Checks if Mygrid is running |
void |
removeGridManagerListener(GridManagerListenerRemote listener)
Unregisters a Grid Manager listener |
void |
removeJob(int jobId)
Erases a specific job if it is not running. |
void |
removeJobManagerListener(JobManagerListenerRemote listener)
Unregisters a Job Manager listener |
void |
setPeers(java.util.Collection<PeerSpec> peerSpecs)
Adds a list of peers that will work as a machine provider to Mygrid. |
void |
setPeers(java.lang.String descriptionFilePath)
Deprecated. |
void |
startMyGridService()
Start MyGrid service. |
void |
stopMyGridService(boolean callExit)
Stop MyGrid service. |
void |
stopMyGridService(boolean wait,
boolean callExit)
Stop MyGrid service. |
void |
waitForJob(int jobId)
The caller will block until the specified job finishes, fails or is cancelled. |
Method Detail |
---|
int addJob(JobSpec theJob) throws java.rmi.RemoteException, CouldNotAddJobOutsideHomeMachineException
JobSpec
obtained
by compiling a JDF (job description file) with Ourgrid compiler.
theJob
- a job specification generated by the Ourgrid compiler from
a JDF
java.rmi.RemoteException
- if a communication problem occurs
CouldNotAddJobOutsideHomeMachineException
- it is only possible to
add a job when running on the same machine as Mygrid@Deprecated int addJob(java.lang.String descriptionFilePath) throws java.rmi.RemoteException, CompilerException, CouldNotAddJobOutsideHomeMachineException
addJob(JobSpec)
.
descriptionFilePath
- the path of a JDF to be compiled
java.rmi.RemoteException
- if a communication problem occurs
CompilerException
- if compiler error occurs
CouldNotAddJobOutsideHomeMachineException
- it is only possible to
add a job when running on the same machine as Mygridvoid cancelJob(int jobId) throws JobNotFoundException, java.rmi.RemoteException, JobCouldNotBeCancelledException
jobId
- the job to cancel
JobNotFoundException
- the job does not exist
java.rmi.RemoteException
- if a communication problem occurs
JobCouldNotBeCancelledException
- if some error occurs when trying
to cancel the jobvoid cleanFinishedJobs() throws java.rmi.RemoteException
java.rmi.RemoteException
- if a communication problem occursjava.util.Collection<GridManagerEntry> getGumEntries(GridManagerListenerRemote newListener) throws java.rmi.RemoteException
newListener
- a reference to the listener that is interested on
receiving updates about machines
java.rmi.RemoteException
- if a communication problem occursjava.util.Collection<GumSpec> getGumSpecs() throws java.rmi.RemoteException
java.rmi.RemoteException
- if a communication problem occursjava.util.Collection<JobEntry> getJobs(JobManagerListenerRemote newListener) throws java.rmi.RemoteException
newListener
- a reference to the listener that is interested on
receiving updates about jobs
java.rmi.RemoteException
- if a communication problem occursjava.util.Collection<PeerEntry> getPeerEntries(GridManagerListenerRemote newListener) throws java.rmi.RemoteException
newListener
- a reference to the listener that is interested on
receiving updates about peers
java.rmi.RemoteException
- if a communication problem occursboolean isMyGridRunning() throws java.rmi.RemoteException
java.rmi.RemoteException
- if a communication problem occursvoid removeGridManagerListener(GridManagerListenerRemote listener) throws java.rmi.RemoteException
listener
- listener a reference to the listener that will be
unregistered
java.rmi.RemoteException
- if a communication problem occursvoid removeJob(int jobId) throws java.rmi.RemoteException, JobCannotBeRemovedException
jobId
- id of the job to be removed
java.rmi.RemoteException
- if a communication problem occurs
JobCannotBeRemovedException
- if the jobs is still runningvoid removeJobManagerListener(JobManagerListenerRemote listener) throws java.rmi.RemoteException
listener
- a reference to the listener that will be unregistered
java.rmi.RemoteException
- if a communication problem occursvoid setPeers(java.util.Collection<PeerSpec> peerSpecs) throws java.rmi.RemoteException
PeerSpec
is obtained by compiling a SDF (site
description file) with Ourgrid compiler.
peerSpecs
- a collection of peer specification generated by the
compiler
java.rmi.RemoteException
- if a communication problem occursDescriptionFileCompile.compileSDF(String)
@Deprecated void setPeers(java.lang.String descriptionFilePath) throws java.rmi.RemoteException, CompilerException
setPeers(Collection)
.
descriptionFilePath
- the path to a SDF to be compiled
java.rmi.RemoteException
- if a communication problem occurs
CompilerException
- if compiler error occursvoid startMyGridService() throws java.rmi.RemoteException, NotExecutingInHomeMachine, MyGridIsAlreadyRunningException, StartingMyGridException, ConfigException
java.rmi.RemoteException
- if a communication problem occurs
NotExecutingInHomeMachine
- if Mygrid is starting on a different
machine than that specified in the Mygrid configuration file
MyGridIsAlreadyRunningException
- if Mygrid is already running
StartingMyGridException
- if Mygrid was unable to start correctly
ConfigException
- if a configuration problem existsvoid stopMyGridService(boolean callExit) throws java.rmi.RemoteException, MyGridIsNotRunningException
callExit
- if is desired to call System.exit() terminating the JVM
(which may be the same of a user's application)
java.rmi.RemoteException
- if a communication problem occurs
MyGridIsNotRunningException
- if trying to stop a Mygrid that was
not startedvoid stopMyGridService(boolean wait, boolean callExit) throws java.rmi.RemoteException, MyGridIsNotRunningException
wait
- if is desired to wait for Mygrid to stop nicely.callExit
- if is desired to call System.exit() terminating the JVM
(which may be the same of a user's application)
java.rmi.RemoteException
- if a communication problem occurs
MyGridIsNotRunningException
- if trying contact a Mygrid that is
not runningvoid waitForJob(int jobId) throws java.rmi.RemoteException, JobNotFoundException
jobId
- the job to wait
java.rmi.RemoteException
- if a communication problem occurs
JobNotFoundException
- if the job does not exist
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |