org.jmonit.features
Class AbstractFeature<F>

java.lang.Object
  extended by org.jmonit.features.AbstractFeature<F>
All Implemented Interfaces:
MonitoringEventListener, Plugin<F>
Direct Known Subclasses:
Concurrency, HttpStatus, LastValues, Statistics

public abstract class AbstractFeature<F>
extends java.lang.Object
implements Plugin<F>, MonitoringEventListener

Abstract support class for Plugins. Stores the MonitoringEventBus and provides a delegate method to publish events. Automatically register the plugin as a MonitoringEventListener.

Author:
Nicolas De Loof

Constructor Summary
AbstractFeature()
           
 
Method Summary
 void fireMonitoringEvent(MonitoringEvent event)
           
<T> T
getFeature(java.lang.Class<T> feature)
           
 void setMonitor(Monitor monitor)
          Set the monitor this plugin extends.
 void setMonitoringEventBus(MonitoringEventBus bus)
          Set the event bus used to dispatch monitoring events between the monitor and it's features.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jmonit.spi.Plugin
getFeature
 
Methods inherited from interface org.jmonit.events.MonitoringEventListener
onMonitoringEvent
 

Constructor Detail

AbstractFeature

public AbstractFeature()
Method Detail

setMonitoringEventBus

public void setMonitoringEventBus(MonitoringEventBus bus)
Set the event bus used to dispatch monitoring events between the monitor and it's features.

Specified by:
setMonitoringEventBus in interface Plugin<F>
Parameters:
bus - the event bus
See Also:
Plugin.setMonitoringEventBus(org.jmonit.events.MonitoringEventBus)

setMonitor

public void setMonitor(Monitor monitor)
Set the monitor this plugin extends. Can be used for direct acces to other features.

Specified by:
setMonitor in interface Plugin<F>
Parameters:
monitor - the extended monitor
See Also:
Plugin.setMonitor(org.jmonit.Monitor)

fireMonitoringEvent

public void fireMonitoringEvent(MonitoringEvent event)

getFeature

public <T> T getFeature(java.lang.Class<T> feature)


Copyright © 2007 Nicolas De Loof. All Rights Reserved.