|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.event.Dispatcher
public abstract class Dispatcher
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.
| Field Summary | |
|---|---|
protected Map<String,ConsumerProfile> |
consumers
Map of consumers by their configured name. |
protected int |
identifier
unique identifer of this dispatcher - cached hash of its text Name |
protected String |
name
|
| Constructor Summary | |
|---|---|
protected |
Dispatcher(String name)
|
| Method Summary | |
|---|---|
abstract void |
addConsumerProfile(ConsumerProfile cp)
Add a consumer to the end of the list. |
abstract void |
dispatch(Context ctx)
Dispatch all events added to this Context according to configured consumers. |
Collection |
getConsumers()
|
int |
getIdentifier()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected int identifier
protected Map<String,ConsumerProfile> consumers
| Constructor Detail |
|---|
protected Dispatcher(String name)
| Method Detail |
|---|
public Collection getConsumers()
public int getIdentifier()
public abstract void addConsumerProfile(ConsumerProfile cp)
throws IllegalArgumentException
consumer - the event consumer to addfilter - the event filter to apply
IllegalArgumentExceptionpublic abstract void dispatch(Context ctx)
ctx - the execution context object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||