Rio Project 4.2 API Documentation



org.rioproject.watch
Class GaugeWatch

java.lang.Object
  extended by org.rioproject.watch.Watch
      extended by org.rioproject.watch.ThresholdWatch
          extended by org.rioproject.watch.GaugeWatch
All Implemented Interfaces:
ThresholdWatchMBean, WatchMBean

public class GaugeWatch
extends ThresholdWatch

A GaugeWatch provides a mechanism to record values that can go up and down, and can be positive or negative.


Field Summary
 
Fields inherited from class org.rioproject.watch.Watch
COMPONENT, DEFAULT_VIEW, id, localRef, logger, watchDataSource
 
Constructor Summary
GaugeWatch(String id)
          Create a new GaugeWatch
GaugeWatch(String id, Configuration config)
          Creates new GaugeWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided
GaugeWatch(WatchDataSource watchDataSource, String id)
          Create a new GaugeWatch
 
Method Summary
 void addValue(double value)
          Add a value
 void addValue(long value)
          Add a value
 
Methods inherited from class org.rioproject.watch.ThresholdWatch
addThresholdListener, addWatchRecord, getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, getThresholdManager, getThresholdValues, removeThresholdListener, setCurrentHighThreshold, setCurrentLowThreshold, setThresholdValues
 
Methods inherited from class org.rioproject.watch.Watch
clear, equals, getCalculables, getId, getLastCalculableValue, getView, getWatchDataSource, hashCode, main, setView, setWatchDataSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.rioproject.watch.WatchMBean
clear, getCalculables, getId, getLastCalculableValue
 

Constructor Detail

GaugeWatch

public GaugeWatch(String id)
Create a new GaugeWatch

Parameters:
id - The identifier for this watch

GaugeWatch

public GaugeWatch(String id,
                  Configuration config)
Creates new GaugeWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided

Parameters:
id - The identifier for this watch
config - Configuration object used for constructing a WatchDataSource

GaugeWatch

public GaugeWatch(WatchDataSource watchDataSource,
                  String id)
Create a new GaugeWatch

Parameters:
watchDataSource - The watch data source associated with this watch
id - The identifier for this watch
Method Detail

addValue

public void addValue(long value)
Add a value

Parameters:
value - New value

addValue

public void addValue(double value)
Add a value

Parameters:
value - New value

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.