org.jacorb.notification.queue
Interface EventQueue

All Known Implementing Classes:
AbstractBoundedEventQueue, BoundedDeadlineEventQueue, BoundedFifoEventQueue, BoundedPriorityEventQueue

public interface EventQueue

Version:
$Id: EventQueue.java,v 1.4 2004/05/06 12:39:59 nicolas Exp $
Author:
Alphonse Bendt

Method Summary
 Message[] getAllEvents(boolean wait)
          get all Messages from this queue.
 Message getEvent(boolean wait)
          get the next Message from this queue. which particular event is selected depends on the underlying implementation.
 Message[] getEvents(int n, boolean wait)
          get up to n events from this queue.
 int getSize()
          access the current size of this queue.
 boolean isEmpty()
          check if this queue is empty.
 void put(Message event)
          put a Message into this queue.
 

Method Detail

getEvent

Message getEvent(boolean wait)
                 throws java.lang.InterruptedException
get the next Message from this queue. which particular event is selected depends on the underlying implementation.

Parameters:
wait - a boolean value. If this parameter is set to true the queue will block until an element is available. If the parameter is set to false the queue will return null in case it is empty.
Throws:
java.lang.InterruptedException

getEvents

Message[] getEvents(int n,
                    boolean wait)
                    throws java.lang.InterruptedException
get up to n events from this queue.

Throws:
java.lang.InterruptedException

getAllEvents

Message[] getAllEvents(boolean wait)
                       throws java.lang.InterruptedException
get all Messages from this queue.

Throws:
java.lang.InterruptedException

put

void put(Message event)
put a Message into this queue.


isEmpty

boolean isEmpty()
check if this queue is empty.


getSize

int getSize()
access the current size of this queue.