fipaos.util
Class FIFOQueue

java.lang.Object
  |
  +--fipaos.util.Queue
        |
        +--fipaos.util.FIFOQueue

public class FIFOQueue
extends Queue

This is a simple queue which provides blocking and non-blocking methods for getting the next element in the queue


Fields inherited from class fipaos.util.Queue
_queue
 
Constructor Summary
FIFOQueue()
          Create a FIFOQueue with no maximum size
FIFOQueue(int max_size)
          Creates a FIFOQueue with the given maximum size
 
Method Summary
protected  java.lang.Object getNextItem()
          Get the next message from the queue.
 
Methods inherited from class fipaos.util.Queue
addItem, flush, getItem, getItemWithoutBlocking, isEmpty, isFull, main, queueLength, releaseBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FIFOQueue

public FIFOQueue(int max_size)
Creates a FIFOQueue with the given maximum size
Parameters:
max_size - The most elements that can be contained within the queue at once, or -1 for no limit

FIFOQueue

public FIFOQueue()
Create a FIFOQueue with no maximum size
Method Detail

getNextItem

protected java.lang.Object getNextItem()
Get the next message from the queue. If the queue is empty, the thread will block until a message is added.
Overrides:
getNextItem in class Queue
Returns:
The next message in the queue, or null if the thread is interrupted