org.barracudamvc.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.
 List listProcessedEvents()
          List events which have already been processed through the queue
 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?
 void setRequiresResponse(boolean val)
          Programatically tell the dispatcher that a response is required
 void setResponseHandled(boolean val)
          Programatically tell the dispatcher that the response has been handled
 

Method Detail

requiresResponse

boolean requiresResponse()
Does this queue require a response?

Returns:
true if this queue requires a response

setRequiresResponse

void setRequiresResponse(boolean val)
Programatically tell the dispatcher that a response is required

Parameters:
true - if a response is required

responseHandled

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

Returns:
true if the response has been handled

setResponseHandled

void setResponseHandled(boolean val)
Programatically tell the dispatcher that the response has been handled

Parameters:
true - if the response has been handled

addEvent

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

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

Returns:
the number of events remaining in the queue

listRemainingEvents

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

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

Returns:
the number of events processed in the queue

listProcessedEvents

List listProcessedEvents()
List events which have already been processed through the queue

Returns:
a list of all events processed in the queue


Copyright © 2006 BarracudaMVC.org All Rights Reserved.