context.arch.util
Class SynchFIFO

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended bycontext.arch.util.SynchFIFO
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class SynchFIFO
extends java.util.Vector

This method provides a synchronized FIFO pipe.

Author:
Agathe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
SynchFIFO()
           
 
Method Summary
 java.lang.Object getNext()
          Returns the next object or waits for the next if the FIFO does'nt contain any, and removes it from the pipe.
 void put(java.lang.Object o)
          Put a new Object in the pipe.
 java.lang.Object[] removeAll()
          Removes all elements from this object and returns an array of the removed objects.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

SynchFIFO

public SynchFIFO()
Method Detail

getNext

public java.lang.Object getNext()
Returns the next object or waits for the next if the FIFO does'nt contain any, and removes it from the pipe.

Returns:
Object The next object

put

public void put(java.lang.Object o)
Put a new Object in the pipe. If the getNext() method had been previously called, the notifyAll allows to send a message to the callers to end the wait.


removeAll

public java.lang.Object[] removeAll()
Removes all elements from this object and returns an array of the removed objects.

Returns:
Object[] The removed objects