it.jnrpe.utils
Class ThresholdUtil

java.lang.Object
  extended by it.jnrpe.utils.ThresholdUtil

Deprecated. Use the ReturnValueBuilder together with the ThresholdsEvaluatorBuilder instead.

@Deprecated
public final class ThresholdUtil
extends Object

Utility class for evaluating threshold This class conforms to the nagios plugin guidelines (http://nagiosplug.sourceforge.net/developer-guidelines.html #THRESHOLDFORMAT). The generalised range format is: [@]start:end Values are interpreted this way:

start and ":" is not required if start=0.

Author:
Massimiliano Ziccardi

Method Summary
static boolean isValueInRange(String thresholdString, BigDecimal value)
          Deprecated. Returns true if the value dalue falls into the range sRange.
static boolean isValueInRange(String thresholdString, int value)
          Deprecated. Returns true if the value iValue falls into the range sRange.
static boolean isValueInRange(String thresholdString, Long value)
          Deprecated. Returns true if the value dalue falls into the range sRange.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isValueInRange

public static boolean isValueInRange(String thresholdString,
                                     int value)
                              throws BadThresholdException
Deprecated. 
Returns true if the value iValue falls into the range sRange.

Parameters:
thresholdString - The range
value - The value
Returns:
true if the value iValue falls into the
Throws:
BadThresholdException - -

isValueInRange

public static boolean isValueInRange(String thresholdString,
                                     BigDecimal value)
                              throws BadThresholdException
Deprecated. 
Returns true if the value dalue falls into the range sRange.

Parameters:
thresholdString - The range
value - The value given range
Returns:
true if the given value falls inside the given range
Throws:
BadThresholdException - -

isValueInRange

public static boolean isValueInRange(String thresholdString,
                                     Long value)
                              throws BadThresholdException
Deprecated. 
Returns true if the value dalue falls into the range sRange.

Parameters:
thresholdString - The range
value - The value given range
Returns:
true if the given value falls inside the given range
Throws:
BadThresholdException - -


Copyright © 2014. All Rights Reserved.