org.ourgrid.mygrid.scheduler
Class JobMonitor

java.lang.Object
  extended by org.ourgrid.mygrid.scheduler.JobMonitor
All Implemented Interfaces:
JobInterested

public class JobMonitor
extends java.lang.Object
implements JobInterested

Object responsible for notifying other objects interested in job completions.


Constructor Summary
JobMonitor(EventQueue responseQueue, int jobId)
          The constructor.
 
Method Summary
 int getJobId()
          Returns the Job identification.
 void jobFinished(JobEntry job)
          Notifies who is waiting for the Job.
 void jobNotFound()
          Notifies that the job of interest does not exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobMonitor

public JobMonitor(EventQueue responseQueue,
                  int jobId)
The constructor.

Parameters:
responseQueue - A response EventQueue.
jobId - A job identification.
Method Detail

jobFinished

public void jobFinished(JobEntry job)
Notifies who is waiting for the Job. Puts a WaitForJobResponseEvent in the responseQueue.

Specified by:
jobFinished in interface JobInterested
Parameters:
job - Job which has finished.

getJobId

public int getJobId()
Returns the Job identification.

Specified by:
getJobId in interface JobInterested
Returns:
The Job identification.

jobNotFound

public void jobNotFound()
Description copied from interface: JobInterested
Notifies that the job of interest does not exist.

Specified by:
jobNotFound in interface JobInterested
See Also:
JobInterested.jobNotFound()