|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 MonitoringEventBus
listener
- 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 MonitoringEventBus
listener
- the monitoring listenerMonitoringEventBus.removeListener(MonitoringEventListener)
public boolean hasListener(MonitoringEventListener listener)
hasListener
in interface MonitoringEventBus
listener
- 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 MonitoringEventBus
event
- 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 |