public class EventManager extends Object implements SystemEventListener
| Modifier and Type | Class and Description |
|---|---|
static class |
EventManager.Ready |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CONFIG |
static String |
DTD_EVENTMANAGER |
static String |
PUBLIC_ID_EVENTMANAGER |
protected ResourceWatcher |
watcher |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventBroker(EventBroker broker)
add an event broker for a specific type of event
|
void |
addEventListener(EventListener listener) |
protected void |
addEventListener(EventListener listener,
boolean propagateToCollected) |
protected void |
configure(String resource) |
Collection<EventBroker> |
getBrokers() |
static EventManager |
getInstance()
use this method to get an instance of the event manager
|
static String |
getMachineName() |
long |
getNumberOfPropagatedEvents() |
long |
getPropagationCost() |
long |
getPropagationCostNs() |
static UUID |
getUUID() |
int |
getWeight()
The weight of an event listener determines the order in which they are called.
|
void |
notify(SystemEvent se) |
void |
propagateEvent(Event event)
This method will propagate the given event to all the aproprate listeners.
|
void |
propagateEvent(Event event,
boolean asynchronous)
Like
propagateEvent(org.mmbase.core.event.Event) but with an extra argument 'asynchronous'. |
void |
removeEventBroker(EventBroker broker)
remove a broker for a specific type of event
|
void |
removeEventListener(EventListener listener) |
void |
shutdown() |
public static final String PUBLIC_ID_EVENTMANAGER
public static final String DTD_EVENTMANAGER
protected static final String CONFIG
protected ResourceWatcher watcher
public static EventManager getInstance()
public static UUID getUUID()
public static String getMachineName()
public void notify(SystemEvent se)
notify in interface SystemEventListenerpublic int getWeight()
WeightEventListenergetWeight in interface WeightEventListenerprotected final void configure(String resource)
public Collection<EventBroker> getBrokers()
public void addEventBroker(EventBroker broker)
broker - public void removeEventBroker(EventBroker broker)
broker - public final void addEventListener(EventListener listener)
protected void addEventListener(EventListener listener, boolean propagateToCollected)
listener - public void removeEventListener(EventListener listener)
listener - public void propagateEvent(Event event)
event - AbstractEventBrokerpublic void propagateEvent(Event event, boolean asynchronous)
propagateEvent(org.mmbase.core.event.Event) but with an extra argument 'asynchronous'.asynchronous - If true, execute the propagation in a different thread, and don't let this thread wait for the result.public long getNumberOfPropagatedEvents()
public long getPropagationCost()
public long getPropagationCostNs()
public void shutdown()
MMBase2 Utils 2.0.0 - 2019-08-08T23:20