org.rhq.core.domain.measurement.ui
Class BaseMetricDisplay

java.lang.Object
  extended by org.rhq.core.domain.measurement.ui.MeasurementSummary
      extended by org.rhq.core.domain.measurement.ui.BaseMetricDisplay
All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
MetricDisplaySummary

public abstract class BaseMetricDisplay
extends MeasurementSummary
implements Serializable, Comparable

Represents a metric that may be displayed in a list context. All fields refer to display needs in a list context in the monitoring UI.

See Also:
Serialized Form

Field Summary
protected static List<String> attrKeyList
           
 
Constructor Summary
BaseMetricDisplay()
          Constructor for MetricDisplaySummary.
 
Method Summary
 int compareTo(Object arg0)
           
 MetricDisplayValue getAvgMetric()
           
 Long getBeginTimeFrame()
          Method getBeginTimeFrame.
 Integer getCollectionType()
          Get the collection type for the metrics.
 Integer getDefinitionId()
           
 String getDescription()
           
 Long getEndTimeFrame()
          Method getEndTimeFrame.
 String getLabel()
          The label of the metric as it is displayed, perhaps the "alias".
 MetricDisplayValue getLastMetric()
           
 MetricDisplayValue getMaxMetric()
           
 MetricDisplayValue getMetric(String key)
           
 String[] getMetricKeys()
           
 String getMetricName()
          This is the metric name, or as it is known in the plugin descriptor, the metric "property".
 Map<String,MetricDisplayValue> getMetrics()
           
 String getMetricSource()
           
 int getMetricSourceId()
           
 double[] getMetricValueDoubles()
           
 MetricDisplayValue getMinMetric()
           
 int getNumberCollecting()
           
 Integer getScheduleId()
           
 Boolean getShowNumberCollecting()
          Returns the showNumberCollecting.
 MetricDisplayValue getSummaryMetric()
           
 String getUnits()
          Method getIntervalUnits.
 void setBeginTimeFrame(Long beginTimeFrame)
          Method setBeginTimeFrame.
 void setCollectionType(Integer collectionType)
           
 void setDefinitionId(Integer definitionId)
           
 void setDescription(String description)
           
 void setEndTimeFrame(Long endTimeFrame)
          Method setEndTimeFrame.
 void setLabel(String label)
          Method setLabel.
 void setMetric(String key, MetricDisplayValue value)
           
 void setMetricName(String name)
           
 void setMetrics(Map<String,MetricDisplayValue> metrics)
           
 void setMetricSource(String string)
           
 void setMetricSourceId(int id)
           
 void setNumberCollecting(int numberCollecting)
           
 void setScheduleId(Integer scheduleId)
          Sets the scheduleId.
 void setShowNumberCollecting(Boolean showNumberCollecting)
          Sets the showNumberCollecting.
 void setUnits(String units)
          Method setIntervalUnits.
 String toString()
           
 
Methods inherited from class org.rhq.core.domain.measurement.ui.MeasurementSummary
asList, getAvailDown, getAvailUnknown, getAvailUp, setAvailDown, setAvailUnknown, setAvailUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attrKeyList

protected static final List<String> attrKeyList
Constructor Detail

BaseMetricDisplay

public BaseMetricDisplay()
Constructor for MetricDisplaySummary.

Method Detail

getMetricValueDoubles

public double[] getMetricValueDoubles()

getMetricKeys

public String[] getMetricKeys()

setMetric

public void setMetric(String key,
                      MetricDisplayValue value)

getMetric

public MetricDisplayValue getMetric(String key)

getMetrics

public Map<String,MetricDisplayValue> getMetrics()

setMetrics

public void setMetrics(Map<String,MetricDisplayValue> metrics)

getMinMetric

public MetricDisplayValue getMinMetric()

getMaxMetric

public MetricDisplayValue getMaxMetric()

getAvgMetric

public MetricDisplayValue getAvgMetric()

getLastMetric

public MetricDisplayValue getLastMetric()

getSummaryMetric

public MetricDisplayValue getSummaryMetric()

getBeginTimeFrame

public Long getBeginTimeFrame()
Method getBeginTimeFrame. All metrics displayed are within a timeframe. The beginning of that timeframe is represented as the number of epoch seconds at which the timeframe commences, this method returns that Long value.

Returns:
Long

setBeginTimeFrame

public void setBeginTimeFrame(Long beginTimeFrame)
Method setBeginTimeFrame. All metrics displayed are within a timeframe. The beginning of that timeframe is represented as the number of epoch seconds at which the timeframe commences, this method sets that Long value.

Parameters:
beginTimeFrame - The beginTimeFrame to set

getEndTimeFrame

public Long getEndTimeFrame()
Method getEndTimeFrame. All metrics displayed are within a timeframe. The end of that timeframe is represented as the number of epoch seconds at which the timeframe is finished, this method returns that Long value.

Returns:
Long

setEndTimeFrame

public void setEndTimeFrame(Long endTimeFrame)
Method setEndTimeFrame. All metrics displayed are within a timeframe. The end of that timeframe is represented as the number of epoch seconds at which the timeframe is finished, this method sets that Long value.

Parameters:
endTimeFrame - The endTimeFrame to set

getLabel

public String getLabel()
The label of the metric as it is displayed, perhaps the "alias". Note that this is NOT the official name of the metric - the name (or the "property" as it is called in the metric definition within the plugin descriptor) is obtains via getMetricName().

Returns:
String

setLabel

public void setLabel(String label)
Method setLabel. The name of the metric as it is displayed, perhaps the "alias"

Parameters:
label - The label to set

getUnits

public String getUnits()
Method getIntervalUnits. Returns the label for the units of the metric (if not intrinsic to the metric itself) measurement

Returns:
String

setUnits

public void setUnits(String units)
Method setIntervalUnits. Sets the label for the units of the metric (if not intrinsic to the metric itself) measurement

Parameters:
units - The units to set

getCollectionType

public Integer getCollectionType()
Get the collection type for the metrics. This value matches to MeasurementConstants.COLL_TYPE_*


setCollectionType

public void setCollectionType(Integer collectionType)

getScheduleId

public Integer getScheduleId()
Returns:
Integer

setScheduleId

public void setScheduleId(Integer scheduleId)
Sets the scheduleId.

Parameters:
scheduleId - The scheduleId to set

getDefinitionId

public Integer getDefinitionId()

setDefinitionId

public void setDefinitionId(Integer definitionId)

getShowNumberCollecting

public Boolean getShowNumberCollecting()
Returns the showNumberCollecting.

Returns:
boolean

getMetricSource

public String getMetricSource()

setMetricSource

public void setMetricSource(String string)

getMetricName

public String getMetricName()
This is the metric name, or as it is known in the plugin descriptor, the metric "property". This is the value that is used by the plugin itself to determine what property to probe to get the measurement. Note that this is specifically not the metric label.


setMetricName

public void setMetricName(String name)

getMetricSourceId

public int getMetricSourceId()

setMetricSourceId

public void setMetricSourceId(int id)

setShowNumberCollecting

public void setShowNumberCollecting(Boolean showNumberCollecting)
Sets the showNumberCollecting.

Parameters:
showNumberCollecting - The showNumberCollecting to set

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

toString

public String toString()
Overrides:
toString in class MeasurementSummary

compareTo

public int compareTo(Object arg0)
Specified by:
compareTo in interface Comparable

getNumberCollecting

public int getNumberCollecting()
Returns:
the numberCollecting

setNumberCollecting

public void setNumberCollecting(int numberCollecting)
Parameters:
numberCollecting - the numberCollecting to set


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.