fipaos.util
Class LIFOQueue

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

public class LIFOQueue
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
LIFOQueue()
          Create a LIFOQueue with no maximum size
LIFOQueue(int max_size)
          Creates a LIFOQueue 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

LIFOQueue

public LIFOQueue(int max_size)
Creates a LIFOQueue 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

LIFOQueue

public LIFOQueue()
Create a LIFOQueue 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