|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.ourgrid.common.rmi.OurgridUnicastRemoteObject
org.ourgrid.mygrid.ui.MyGridUIManager
public class MyGridUIManager
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Method Summary | |
---|---|
int |
addJob(JobSpec newJob)
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 listener)
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 |
static UIManager |
getInstance()
|
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 |
isExecutingInHomeMachine()
|
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 |
static void |
reset()
Resets the singleton. |
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. |
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 |
Method Detail |
---|
public static void reset()
public static UIManager getInstance() throws java.rmi.RemoteException
java.rmi.RemoteException
public void startMyGridService() throws NotExecutingInHomeMachine, MyGridIsAlreadyRunningException, StartingMyGridException, ConfigException
UIManager
startMyGridService
in interface UIManager
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 existspublic void stopMyGridService(boolean wait, boolean callExit) throws MyGridIsNotRunningException
UIManager
stopMyGridService
in interface UIManager
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)
MyGridIsNotRunningException
- if trying contact a Mygrid that is
not runningpublic void stopMyGridService(boolean callExit) throws MyGridIsNotRunningException
UIManager
stopMyGridService
in interface UIManager
callExit
- if is desired to call System.exit() terminating the JVM
(which may be the same of a user's application)
MyGridIsNotRunningException
- if trying to stop a Mygrid that was
not startedpublic boolean isMyGridRunning()
UIManager
isMyGridRunning
in interface UIManager
public boolean isExecutingInHomeMachine()
public java.util.Collection<JobEntry> getJobs(JobManagerListenerRemote newListener) throws java.rmi.RemoteException
UIManager
getJobs
in interface UIManager
newListener
- a reference to the listener that is interested on
receiving updates about jobs
java.rmi.RemoteException
- if a communication problem occurspublic void cancelJob(int jobId) throws JobNotFoundException, java.rmi.RemoteException, JobCouldNotBeCancelledException
UIManager
cancelJob
in interface UIManager
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 jobpublic void waitForJob(int jobId) throws java.rmi.RemoteException, JobNotFoundException
UIManager
waitForJob
in interface UIManager
jobId
- the job to wait
java.rmi.RemoteException
- if a communication problem occurs
JobNotFoundException
- if the job does not existpublic int addJob(JobSpec newJob) throws java.rmi.RemoteException
UIManager
JobSpec
obtained
by compiling a JDF (job description file) with Ourgrid compiler.
addJob
in interface UIManager
newJob
- a job specification generated by the Ourgrid compiler from
a JDF
java.rmi.RemoteException
- if a communication problem occurspublic void cleanFinishedJobs() throws java.rmi.RemoteException
UIManager
cleanFinishedJobs
in interface UIManager
java.rmi.RemoteException
- if a communication problem occurspublic void removeJob(int jobId) throws java.rmi.RemoteException, JobCannotBeRemovedException
UIManager
removeJob
in interface UIManager
jobId
- id of the job to be removed
java.rmi.RemoteException
- if a communication problem occurs
JobCannotBeRemovedException
- if the jobs is still runningpublic java.util.Collection<PeerEntry> getPeerEntries(GridManagerListenerRemote newListener) throws java.rmi.RemoteException
UIManager
getPeerEntries
in interface UIManager
newListener
- a reference to the listener that is interested on
receiving updates about peers
java.rmi.RemoteException
- if a communication problem occurspublic void setPeers(java.util.Collection<PeerSpec> peerSpecs) throws java.rmi.RemoteException
UIManager
PeerSpec
is obtained by compiling a SDF (site
description file) with Ourgrid compiler.
setPeers
in interface UIManager
peerSpecs
- a collection of peer specification generated by the
compiler
java.rmi.RemoteException
- if a communication problem occursDescriptionFileCompile.compileSDF(String)
public java.util.Collection<GumSpec> getGumSpecs() throws java.rmi.RemoteException
UIManager
getGumSpecs
in interface UIManager
java.rmi.RemoteException
- if a communication problem occurspublic java.util.Collection<GridManagerEntry> getGumEntries(GridManagerListenerRemote listener) throws java.rmi.RemoteException
UIManager
getGumEntries
in interface UIManager
listener
- a reference to the listener that is interested on
receiving updates about machines
java.rmi.RemoteException
- if a communication problem occurs@Deprecated public void setPeers(java.lang.String descriptionFilePath) throws java.rmi.RemoteException, CompilerException
UIManager
UIManager.setPeers(Collection)
.
setPeers
in interface UIManager
descriptionFilePath
- the path to a SDF to be compiled
java.rmi.RemoteException
- if a communication problem occurs
CompilerException
- if compiler error occurs@Deprecated public int addJob(java.lang.String descriptionFilePath) throws CompilerException, java.rmi.RemoteException, CouldNotAddJobOutsideHomeMachineException
UIManager
UIManager.addJob(JobSpec)
.
addJob
in interface UIManager
descriptionFilePath
- the path of a JDF to be compiled
CompilerException
- if compiler error occurs
java.rmi.RemoteException
- if a communication problem occurs
CouldNotAddJobOutsideHomeMachineException
- it is only possible to
add a job when running on the same machine as Mygridpublic void removeJobManagerListener(JobManagerListenerRemote listener) throws java.rmi.RemoteException
UIManager
removeJobManagerListener
in interface UIManager
listener
- a reference to the listener that will be unregistered
java.rmi.RemoteException
- if a communication problem occurspublic void removeGridManagerListener(GridManagerListenerRemote listener) throws java.rmi.RemoteException
UIManager
removeGridManagerListener
in interface UIManager
listener
- listener a reference to the listener that will be
unregistered
java.rmi.RemoteException
- if a communication problem occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |