com.waveset.util
Class BufferedSupplier

java.lang.Object
  extended bycom.waveset.util.BufferedSupplier
All Implemented Interfaces:
java.lang.Runnable

public class BufferedSupplier
extends java.lang.Object
implements java.lang.Runnable

BufferedSupplier will push objects that are retrieved from 'supplier' into the queue 'queue'. It assumes that a call on 'supplier' returns an Object[], from which it extracts the individual objects, and inserts them into 'queue' in order. If an Exception occurs while getting objects from the supplier, that Exception object is put onto the queue. BufferedSupplier.run() will terminate when one of the following is true:


Constructor Summary
BufferedSupplier(EDU.oswego.cs.dl.util.concurrent.BoundedBuffer queue, Supplier supplier)
           
 
Method Summary
 boolean isClosed()
           
 void run()
           
 void setClosed(boolean closed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedSupplier

public BufferedSupplier(EDU.oswego.cs.dl.util.concurrent.BoundedBuffer queue,
                        Supplier supplier)
Method Detail

setClosed

public void setClosed(boolean closed)

isClosed

public boolean isClosed()

run

public void run()
Specified by:
run in interface java.lang.Runnable