org.apache.cocoon.portal.event
Interface Receiver

All Superinterfaces:
Preloadable
All Known Implementing Classes:
AbstractActionAspect, AbstractProfileManager, BasketManagerImpl, CachingURICopletAdapter, DefaultLayoutFactory, InternalEventReceiver, PortletAdapter, WSRPAdapter

public interface Receiver
extends Preloadable

A receiver registers its interest in a class of events through the EventManager. An event is an object of the interface Event or a subclass/interface of it. Usually a receiver is not interested in every event but only for some specific event types. These types are represented by an own subclass/interface. When a receiver subscribes itself at the event manager, the manager checks (using reflection) for occurances of the method "inform" on the receiver. The signature of the method consists of two parameters, where the first one is the event subclass and the second one the PortalService. If for example a receiver is interested in all CopletInstanceEvents then it subscribes using the event manager and should provide an inform method with the following signature: public void inform(CopletInstanceEvent event, PortalService). If a receiver is interested in more than one event type, then it can implement several inform methods each with the corresponding event class as the first parameter. This interface extends Preloadable as a receiver should subscribe itself as soon as the portal starts up.

Version:
$Id: Receiver.java 326104 2005-10-18 13:34:13Z cziegeler $



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