Class Dispatcher

java.lang.Object
org.dspace.event.Dispatcher
Direct Known Subclasses:
BasicDispatcher

public abstract class Dispatcher extends Object
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 Details

    • name

      protected String name
    • identifier

      protected int identifier
      unique identifier of this dispatcher - cached hash of its text Name
    • consumers

      protected Map<String,ConsumerProfile> consumers
      Map of consumers by their configured name.
  • Constructor Details

    • Dispatcher

      protected Dispatcher(String name)
  • Method Details

    • getConsumers

      public Collection getConsumers()
    • getIdentifier

      public int getIdentifier()
      Returns:
      unique integer that identifies this Dispatcher configuration.
    • addConsumerProfile

      public abstract void addConsumerProfile(ConsumerProfile cp) throws IllegalArgumentException
      Add a consumer profile to the end of the list.
      Parameters:
      cp - the event consumer profile to add
      Throws:
      IllegalArgumentException
    • dispatch

      public abstract void dispatch(Context ctx)
      Dispatch all events added to this Context according to configured consumers.
      Parameters:
      ctx - the execution context object