org.datamanager.kernel
Interface EventGenerator

All Known Implementing Classes:
Entity, Pool

public interface EventGenerator

EventGenerators are able to generate events. Their natural collaborators are EventHandlers that can subscribe to them specifying a constraint to indicate which events interest them.

Author:
Matthew Farrellee

Method Summary
 void subscribe(EventHandler handler, EventConstraint constraint)
          Subscribe an EventHandler with an EventConstraint.
 void unsubscribe(EventHandler handler)
          Unsubscribe an EventHandler.
 

Method Detail

subscribe

public void subscribe(EventHandler handler,
                      EventConstraint constraint)
               throws DataManagerException
Subscribe an EventHandler with an EventConstraint.

Parameters:
handler - The EventHandler that will observe the events.
constraint - The constraint that identifies the events of interest to the EventHandler.
Throws:
DataManagerException

unsubscribe

public void unsubscribe(EventHandler handler)
                 throws DataManagerException
Unsubscribe an EventHandler.

Parameters:
handler - The EventHandler to unsubscribe.
Throws:
DataManagerException


See the Helium Website