org.simoes.lpd.util
Class PrintQueueWithTableModel

java.lang.Object
  extended byorg.simoes.lpd.util.PrintQueue
      extended byorg.simoes.lpd.util.PrintQueueWithTableModel

public class PrintQueueWithTableModel
extends PrintQueue

The PrintQueue is just a queue that only accepts print jobs still need to figure out how the events get sent

Author:
Chris Simoes

Field Summary
 
Fields inherited from class org.simoes.lpd.util.PrintQueue
lock, queue
 
Constructor Summary
PrintQueueWithTableModel(java.lang.String name, PrintJobTableModel printJobTableModel)
          constructor.
 
Method Summary
 long add(PrintJob printJob)
          add print job to queue.
 PrintJob remove(long id)
          remove print job from queue.
 int removeAll()
          remove all print jobs from queue.
 
Methods inherited from class org.simoes.lpd.util.PrintQueue
closeQueue, getLock, getNextPrintJob, list, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintQueueWithTableModel

public PrintQueueWithTableModel(java.lang.String name,
                                PrintJobTableModel printJobTableModel)
constructor.

Parameters:
name - - name of the print queue.
Method Detail

add

public long add(PrintJob printJob)
add print job to queue.

Overrides:
add in class PrintQueue
Returns:
the unique identifier of the print job in the queue.

remove

public PrintJob remove(long id)
remove print job from queue.

Overrides:
remove in class PrintQueue
Returns:
print job from the queue or null if it was not found

removeAll

public int removeAll()
remove all print jobs from queue.

Overrides:
removeAll in class PrintQueue
Returns:
number of jobs removed, or -1 if this failed