Package org.dspace.event
Class Dispatcher
java.lang.Object
org.dspace.event.Dispatcher
- Direct Known Subclasses:
BasicDispatcher
Interface for event dispatchers. The primary role of a dispatcher is to
deliver a set of events to a configured list of consumers. It may also
transform, consolidate, and otherwise optimize the event stream prior to
delivering events to its consumers.
- Version:
- $Revision$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,ConsumerProfile> Map of consumers by their configured name.protected intunique identifier of this dispatcher - cached hash of its text Nameprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidAdd a consumer profile to the end of the list.abstract voidDispatch all events added to this Context according to configured consumers.int
-
Field Details
-
name
-
identifier
protected int identifierunique identifier of this dispatcher - cached hash of its text Name -
consumers
Map of consumers by their configured name.
-
-
Constructor Details
-
Dispatcher
-
-
Method Details
-
getConsumers
-
getIdentifier
public int getIdentifier()- Returns:
- unique integer that identifies this Dispatcher configuration.
-
addConsumerProfile
Add a consumer profile to the end of the list.- Parameters:
cp- the event consumer profile to add- Throws:
IllegalArgumentException
-
dispatch
Dispatch all events added to this Context according to configured consumers.- Parameters:
ctx- the execution context object
-