util
Class MotorizedQueue

java.lang.Object
  |
  +--util.MotorizedQueue

public class MotorizedQueue
extends Object

This makes it easy for a thread to serve a bunch of objects to another thread with complete syncronization and without worry about multiple objects being processed at once. get() will return when an object is available.


Constructor Summary
MotorizedQueue()
           
 
Method Summary
 void add(Object o)
           
 Object get()
          Block until something available, and then return it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MotorizedQueue

public MotorizedQueue()
Method Detail

add

public void add(Object o)

get

public Object get()
Block until something available, and then return it.