org.mmbase.core.event
Class EventManager

java.lang.Object
  extended byorg.mmbase.core.event.EventManager

public class EventManager
extends Object

This class manages all event related stuff. it is the place to register event brokers, and it will propagate all events. The class is set up as a singleton, with lazy instantiation. When the manager is instantiated, event brokers are added for Event, NodeEvent and RelationEvent

Since:
MMBase-1.8
Version:
$Id: EventManager.java,v 1.12 2006/06/20 21:23:15 michiel Exp $
Author:
Ernst Bunders

Field Summary
static String DTD_EVENTMANAGER
           
static String PUBLIC_ID_EVENTMANAGER
           
protected  ResourceWatcher watcher
           
 
Method Summary
 void addEventBroker(AbstractEventBroker broker)
          add an event broker for a specific type of event
 void addEventListener(EventListener listener)
           
protected  void configure(String resource)
           
static EventManager getInstance()
          use this metod to get an instance of the event manager
 long getNumberOfPropagatedEvents()
           
 long getPropagationCost()
           
 void propagateEvent(Event event)
          This method will propagate the given event to all the aproprate listeners.
 void removeEventBroker(AbstractEventBroker broker)
          remove a broker for a specific type of event
 void removeEventListener(EventListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUBLIC_ID_EVENTMANAGER

public static final String PUBLIC_ID_EVENTMANAGER
See Also:
Constant Field Values

DTD_EVENTMANAGER

public static final String DTD_EVENTMANAGER
See Also:
Constant Field Values

watcher

protected ResourceWatcher watcher
Method Detail

getInstance

public static EventManager getInstance()
use this metod to get an instance of the event manager


configure

protected void configure(String resource)

addEventBroker

public void addEventBroker(AbstractEventBroker broker)
add an event broker for a specific type of event

Parameters:
broker -

removeEventBroker

public void removeEventBroker(AbstractEventBroker broker)
remove a broker for a specific type of event

Parameters:
broker -

addEventListener

public void addEventListener(EventListener listener)
Parameters:
listener -

removeEventListener

public void removeEventListener(EventListener listener)
Parameters:
listener -

propagateEvent

public void propagateEvent(Event event)
This method will propagate the given event to all the aproprate listeners. what makes a listener apropriate is determined by it's type (class) and by possible constraint properties (if the handling broker supports those

Parameters:
event -
See Also:
AbstractEventBroker

getNumberOfPropagatedEvents

public long getNumberOfPropagatedEvents()
Since:
MMBase-1.8.1

getPropagationCost

public long getPropagationCost()
Since:
MMBase-1.8.1


MMBase build 1.8.1.20060716