uk.ac.ic.doc.automed.util.queue
Class Queue

java.lang.Object
  extended by uk.ac.ic.doc.automed.util.queue.Queue

public class Queue
extends java.lang.Object


Constructor Summary
Queue()
          Creates a new instance of Queue
 
Method Summary
 void addJob(Job job, JobHandler handlerObj)
          Add a new a job to end of queue
 java.lang.Object getJob()
          Check if there are any jobs.
protected  void setQueueWorker(QueueWorker worker)
          Register the QueueWorker object to update queue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Queue

public Queue()
Creates a new instance of Queue

Method Detail

addJob

public void addJob(Job job,
                   JobHandler handlerObj)
Add a new a job to end of queue


getJob

public java.lang.Object getJob()
                        throws QueueException
Check if there are any jobs. If no, wait until there are jobs. Otherwise, get the next job in queue and return it

Throws:
QueueException

setQueueWorker

protected void setQueueWorker(QueueWorker worker)
Register the QueueWorker object to update queue