|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jmonit.events.DefaultMonitoringEventBus
public class DefaultMonitoringEventBus
A synchronous implementation of the MonitoringEventBus.
"Synchronous" means the event is dispatched to and consumed by all listeners before the emitter can resume processing.
| Constructor Summary | |
|---|---|
DefaultMonitoringEventBus()
|
|
| Method Summary | |
|---|---|
void |
addListener(MonitoringEventListener listener)
Adds the listener to the collection of listeners who will be notifed when any monitoring event occurs. |
void |
fireMonitoringEvent(MonitoringEvent event)
Dispatches the given MonitoringEvent to all registred
listeners (calls method
MonitoringEventListener.onMonitoringEvent(MonitoringEvent) on all
of them}. |
boolean |
hasListener(MonitoringEventListener listener)
Returns whether the specified instance of monitoring listener was added to the collection of listeners who will be notifed when an transfer event occurs |
void |
removeListener(MonitoringEventListener listener)
Removes the transfer listener from the collection of listeners so it no longer receives transfer events. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultMonitoringEventBus()
| Method Detail |
|---|
public void addListener(MonitoringEventListener listener)
null,
no exception is thrown and no action is performed
addListener in interface MonitoringEventBuslistener - the monitoring listenerMonitoringEventBus.addListener(org.jmonit.events.MonitoringEventListener)public void removeListener(MonitoringEventListener listener)
null
or specified listener was not added to this
MonitoringEventSupport object no exception is thrown and
no action is performed
removeListener in interface MonitoringEventBuslistener - the monitoring listenerMonitoringEventBus.removeListener(MonitoringEventListener)public boolean hasListener(MonitoringEventListener listener)
hasListener in interface MonitoringEventBuslistener - the transfer listener
true
if given listener was added to the collection of listeners
false otherwise- See Also:
MonitoringEventBus.hasListener(MonitoringEventListener)public void fireMonitoringEvent(MonitoringEvent event)
MonitoringEvent to all registred
listeners (calls method
MonitoringEventListener.onMonitoringEvent(MonitoringEvent) on all
of them}.
fireMonitoringEvent in interface MonitoringEventBusevent - the MonitorTaggedEvent which will be dispached to listenersMonitoringEventBus.fireMonitoringEvent(org.jmonit.events.MonitoringEvent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||