org.apache.cocoon.portal.event
Interface EventManager

All Known Implementing Classes:
DefaultEventManager

public interface EventManager

This component manages the event handling mechanism in the portal. The event mechanism is based on the publisher/subscriber principle. An interested component (a Receiver can subscribe itself for a specific class (or classes) of events. All Events have a common ancestor type Event and the event types are identified by a (sub)class

Version:
$Id: EventManager.java 312664 2005-10-10 15:20:02Z cziegeler $

Field Summary
static String ROLE
          Represents the role of the service
 
Method Summary
 void processEvents()
          Process the events
 void send(Event event)
          Publish an event.
 void subscribe(Receiver receiver)
          Subscribes a receiver for a specific type of event.
 void unsubscribe(Receiver receiver)
          Unsubscribes a receiver for all events.
 

Field Detail

ROLE

public static final String ROLE
Represents the role of the service

Method Detail

processEvents

public void processEvents()
                   throws ProcessingException
Process the events

Throws:
ProcessingException

send

public void send(Event event)
Publish an event. All registered receivers get notified.

Parameters:
event - The event to broadcast.

subscribe

public void subscribe(Receiver receiver)
Subscribes a receiver for a specific type of event.


unsubscribe

public void unsubscribe(Receiver receiver)
Unsubscribes a receiver for all events.



Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.