org.jmonit.events
Interface MonitoringEventBus

All Known Implementing Classes:
AbstractMonitor, DefaultMonitor, DefaultMonitoringEventBus

public interface MonitoringEventBus

Author:
Nicolas De Loof

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.
 

Method Detail

addListener

void addListener(MonitoringEventListener listener)
Adds the listener to the collection of listeners who will be notifed when any monitoring event occurs.
If listener is null, no exception is thrown and no action is performed

Parameters:
listener - the monitoring listener
See Also:
removeListener(org.jmonit.events.MonitoringEventListener), MonitoringEventListener

removeListener

void removeListener(MonitoringEventListener listener)
Removes the transfer listener from the collection of listeners so it no longer receives transfer events.
If listener is null or specified listener was not added to this MonitoringEventSupport object no exception is thrown and no action is performed

Parameters:
listener - the monitoring listener
See Also:
addListener(org.jmonit.events.MonitoringEventListener)

hasListener

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

Parameters:
listener - the transfer listener
Returns:
true if given listener was added to the collection of listeners false otherwise
See Also:
addListener(org.jmonit.events.MonitoringEventListener)

fireMonitoringEvent

void fireMonitoringEvent(MonitoringEvent event)
Dispatches the given MonitoringEvent to all registred listeners (calls method MonitoringEventListener.onMonitoringEvent(MonitoringEvent) on all of them}.

Parameters:
event - the MonitorTaggedEvent which will be dispached to listeners


Copyright © 2007 Nicolas De Loof. All Rights Reserved.