Saturday, April 30, 2011

Listing 2: package event


Listing 2:
package event;

/**
 * The interface used by any component that
 * distributes events to other consumers.
 */
public interface EventDistributor {
  /**
   * Add an Event Consumer to the existing set of
   * event consumers that will be called when an
   * event of the proper type is recieved.
   * @param EventConsumer the consumer to be
   * added.
   * @param String the context in which the event
   * consumer wants to be called.
   */
  public void addEventConsumer(EventConsumer cons,
    String context);

  /**
   * Remove an Event Consumer from the existing
   * set of event consumers that will be called
   * when an event is processed.
   * @param EventConsumer the consumer to be
   * removed.
   */
  public void removeEventConsumer(EventConsumer c);
}
 

No comments:

Post a Comment