aleph.comm.udp
Class PacketQueue

java.lang.Object
  |
  +--aleph.comm.udp.PacketQueue

public class PacketQueue
extends java.lang.Object

Synchronized FIFO packet queue.

See Also:
aleph.comm.datagram.Packet

Constructor Summary
PacketQueue()
           
 
Method Summary
 Packet deq()
           
 boolean empty()
           
 void enq(Packet packet)
          Splice list of packets at tail of queue.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PacketQueue

public PacketQueue()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

empty

public boolean empty()
Returns:
true iff queue contains no packets.

enq

public void enq(Packet packet)
Splice list of packets at tail of queue.
Parameters:
packet - Head of Packet list.

deq

public Packet deq()
Returns:
next Packet. Blocks if none available.