org.enhydra.barracuda.core.event
Interface DispatchQueue

All Known Implementing Classes:
DefaultDispatchQueue

public interface DispatchQueue

This interface defines the methods needed to implement a DispatchQueue


Method Summary
 void addEvent(BaseEvent baseEvent)
          Adds an event to the queue.
 java.util.List listProcessedEvents()
          List events which have already been processed through the queue
 java.util.List listRemainingEvents()
          List all events remaining in the queue (Request events first, then Response events)
 int numberOfEventsProcessed()
          get the number of events that have been processed
 int numberOfEventsRemaining()
          get the number of events remaining in the queue
 boolean requiresResponse()
          Does this queue require a response?
 boolean responseHandled()
          Has the response for this queue been handled?
 

Method Detail

requiresResponse

public boolean requiresResponse()
Does this queue require a response?

Returns:
true if this queue requires a response

responseHandled

public boolean responseHandled()
Has the response for this queue been handled?

Returns:
true if the response has been handled

addEvent

public void addEvent(BaseEvent baseEvent)
Adds an event to the queue. When this happens, we first remove any existing events in the queue that this event .equals(), and then this event is added. This has the effect of collapsing duplicates.

Parameters:
baseEvent - the event to be added to the queue

numberOfEventsRemaining

public int numberOfEventsRemaining()
get the number of events remaining in the queue

Returns:
the number of events remaining in the queue

listRemainingEvents

public java.util.List listRemainingEvents()
List all events remaining in the queue (Request events first, then Response events)

Returns:
a list of all events remaining in the queue

numberOfEventsProcessed

public int numberOfEventsProcessed()
get the number of events that have been processed

Returns:
the number of events processed in the queue

listProcessedEvents

public java.util.List listProcessedEvents()
List events which have already been processed through the queue

Returns:
a list of all events processed in the queue


Copyright © 2001 Enhydra.org