org.opennms.netmgt.threshd
Class BaseThresholdDefConfigWrapper

java.lang.Object
  extended by org.opennms.netmgt.threshd.BaseThresholdDefConfigWrapper
Direct Known Subclasses:
ExpressionConfigWrapper, ThresholdConfigWrapper

public abstract class BaseThresholdDefConfigWrapper
extends Object

Author:
Jeff Gehlbach, Craig Miskell

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

Constructor Detail

BaseThresholdDefConfigWrapper

protected BaseThresholdDefConfigWrapper(Basethresholddef baseDef)
Method Detail

getConfigWrapper

public static BaseThresholdDefConfigWrapper getConfigWrapper(Basethresholddef baseDef)
                                                      throws ThresholdExpressionException
Throws:
ThresholdExpressionException

getDatasourceExpression

public abstract String getDatasourceExpression()
Returns:
a descriptive string for the data source - typically either a data source name, or an expression of data source names

getRequiredDatasources

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

Returns:
Collection of the names of datasources

evaluate

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

Parameters:
values - named values to use in evaluating the expression/data source
Returns:
the value of the evaluated expression
Throws:
ThresholdExpressionException

getDsType

public String getDsType()

getDsLabel

public String getDsLabel()

getRearm

public double getRearm()

getTrigger

public int getTrigger()

getType

public String getType()

getValue

public double getValue()

hasRearm

public boolean hasRearm()

hasTrigger

public boolean hasTrigger()

hasValue

public boolean hasValue()

getTriggeredUEI

public String getTriggeredUEI()

getRearmedUEI

public String getRearmedUEI()

getBasethresholddef

public Basethresholddef getBasethresholddef()


Copyright © 2009. All Rights Reserved.