org.npsnet.xrti
Class ReceiveOrderQueue

java.lang.Object
  extended byorg.npsnet.xrti.ReceiveOrderQueue

public class ReceiveOrderQueue
extends java.lang.Object

ReceiveOrderQueue represents FIFO receive queue for receive order (RO) messages. Receive order messages are sorted as they arrive.

Author:
Stanislav Kozina
See Also:
HLAMessage

Field Summary
private  java.util.LinkedList list
          List used as a queue for receive order messages.
 
Constructor Summary
ReceiveOrderQueue()
          Creates an instance of ReceiveOrderQueue.
 
Method Summary
 HLAMessage dequeue()
          Dequeues and returns first message in queue or null if the queue is epmty.
 void enqueue(HLAMessage message)
          Enqueues specified message into the queue.
 int getLength()
          Returns the length of the queue.
 boolean isEmpty()
          Returns true if the queue is empty, false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

private java.util.LinkedList list
List used as a queue for receive order messages.

Constructor Detail

ReceiveOrderQueue

public ReceiveOrderQueue()
Creates an instance of ReceiveOrderQueue. You should never need to create an instance of this class.

Method Detail

isEmpty

public boolean isEmpty()
Returns true if the queue is empty, false otherwise.

Returns:
true if the queue is empty, false otherwise

enqueue

public void enqueue(HLAMessage message)
Enqueues specified message into the queue.

Parameters:
message - message to enqueue

dequeue

public HLAMessage dequeue()
Dequeues and returns first message in queue or null if the queue is epmty.

Returns:
first message in queue or null if the queue is epmty

getLength

public int getLength()
Returns the length of the queue.

Returns:
the length of the queue