org.opennms.netmgt.threshd
Class ThresholdConfigWrapper

java.lang.Object
  extended by org.opennms.netmgt.threshd.BaseThresholdDefConfigWrapper
      extended by org.opennms.netmgt.threshd.ThresholdConfigWrapper

public class ThresholdConfigWrapper
extends BaseThresholdDefConfigWrapper

ThresholdConfigWrapper class.

Version:
$Id: $
Author:
ranger

Constructor Summary
ThresholdConfigWrapper(Threshold threshold)
          Constructor for ThresholdConfigWrapper.
 
Method Summary
 double evaluate(Map<String,Double> values)
          Evaluate the threshold expression/datasource in terms of the named values supplied, and return that value
 String getDatasourceExpression()
          getDatasourceExpression
 Collection<String> getRequiredDatasources()
          Returns the names of the datasources required to evaluate this threshold
 
Methods inherited from class org.opennms.netmgt.threshd.BaseThresholdDefConfigWrapper
equals, getBasethresholddef, getConfigWrapper, getDsLabel, getDsType, getRearm, getRearmedUEI, getTrigger, getTriggeredUEI, getType, getValue, hashCode, hasRearm, hasTrigger, hasValue, identical, merge
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThresholdConfigWrapper

public ThresholdConfigWrapper(Threshold threshold)

Constructor for ThresholdConfigWrapper.

Parameters:
threshold - a Threshold object.
Method Detail

getDatasourceExpression

public String getDatasourceExpression()

getDatasourceExpression

Specified by:
getDatasourceExpression in class BaseThresholdDefConfigWrapper
Returns:
a descriptive string for the data source - typically either a data source name, or an expression of data source names

getRequiredDatasources

public Collection<String> getRequiredDatasources()
Returns the names of the datasources required to evaluate this threshold

Specified by:
getRequiredDatasources in class BaseThresholdDefConfigWrapper
Returns:
Collection of the names of datasources

evaluate

public double evaluate(Map<String,Double> values)
                throws ThresholdExpressionException
Evaluate the threshold expression/datasource in terms of the named values supplied, and return that value

Specified by:
evaluate in class BaseThresholdDefConfigWrapper
Parameters:
values - named values to use in evaluating the expression/data source
Returns:
the value of the evaluated expression
Throws:
ThresholdExpressionException - if any.


Copyright © 2011. All Rights Reserved.