org.ourgrid.mygrid.ui.command
Class JobExpecter

java.lang.Object
  extended by org.ourgrid.mygrid.ui.command.JobExpecter
All Implemented Interfaces:
Command

public class JobExpecter
extends java.lang.Object
implements Command

Description: This class is responsible to wait for the end of a currently submitted job. Calls to this class can be made by getting an instance from JobExpecter and using its API or through mygrid waitforjob script. At both of them the method only return when the specified \ job has ended it's execution.


Constructor Summary
JobExpecter(UIManager manager)
           
 
Method Summary
 boolean configureEnvironment()
          Determines if this command needs to configure environment before being executed
static void printUsage()
          Print's this class command line usage.
 int run(java.lang.String[] params)
          Main method.
 void waitForJob(int jobId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobExpecter

public JobExpecter(UIManager manager)
Method Detail

run

public int run(java.lang.String[] params)
Main method. This method should be called with a Job Id as command line argument.

Specified by:
run in interface Command
Parameters:
params - Job Id

printUsage

public static void printUsage()
Print's this class command line usage.


configureEnvironment

public boolean configureEnvironment()
Description copied from interface: Command
Determines if this command needs to configure environment before being executed

Specified by:
configureEnvironment in interface Command
Returns:
true if this command needs to configure environment before. False, otherwise.
See Also:
Command.configureEnvironment()

waitForJob

public void waitForJob(int jobId)
                throws java.rmi.RemoteException,
                       JobNotFoundException
Throws:
java.rmi.RemoteException
JobNotFoundException