it.jnrpe.plugins
Class Metric

java.lang.Object
  extended by it.jnrpe.plugins.Metric

public class Metric
extends Object

This class represent a metric gathered from a plugin.

Author:
Massimiliano Ziccardi

Constructor Summary
Metric(String name, String message, BigDecimal value, BigDecimal min, BigDecimal max)
          Builds and initializes a metric object.
 
Method Summary
 BigDecimal getMaxValue()
           
 String getMessage()
           
 String getMetricName()
           
 BigDecimal getMetricValue()
           
 BigDecimal getMinValue()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Metric

public Metric(String name,
              String message,
              BigDecimal value,
              BigDecimal min,
              BigDecimal max)
Builds and initializes a metric object.

Parameters:
name - The name of the metric
message - The message associated with this metric. For example: disk usage 50%.
value - The value of this metric (can't be null)
min - The minimum value for this metric (can be null)
max - The maximum value for this metric (can be null)
Method Detail

getMetricName

public final String getMetricName()
Returns:
The name of this metric.

getMetricValue

public final BigDecimal getMetricValue()
Returns:
The value of this metric.

getMinValue

public final BigDecimal getMinValue()
Returns:
The minimum value for this metric.

getMaxValue

public final BigDecimal getMaxValue()
Returns:
The maximum value for this metric.

getMessage

public final String getMessage()
Returns:
The message associated with this metric.


Copyright © 2014. All Rights Reserved.