org.rhq.enterprise.server.measurement.uibean
Class BaseMetricDisplay

java.lang.Object
  extended by org.rhq.enterprise.server.measurement.uibean.MeasurementSummary
      extended by org.rhq.enterprise.server.measurement.uibean.BaseMetricDisplay
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
MetricDisplaySummary

public abstract class BaseMetricDisplay
extends MeasurementSummary
implements java.io.Serializable, java.lang.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 java.util.List<java.lang.String> attrKeyList
           
 
Constructor Summary
BaseMetricDisplay()
          Constructor for MetricDisplaySummary.
 
Method Summary
 int compareTo(java.lang.Object arg0)
           
 MetricDisplayValue getAvgMetric()
           
 java.lang.Long getBeginTimeFrame()
          Method getBeginTimeFrame.
 java.lang.Integer getCollectionType()
          Get the collection type for the metrics.
 java.lang.Integer getDefinitionId()
           
 java.lang.String getDescription()
           
 java.lang.Long getEndTimeFrame()
          Method getEndTimeFrame.
 java.lang.String getLabel()
          Method getLabel.
 MetricDisplayValue getLastMetric()
           
 MetricDisplayValue getMaxMetric()
           
 MetricDisplayValue getMetric(java.lang.String key)
           
 java.lang.String[] getMetricKeys()
           
 java.util.Map<java.lang.String,MetricDisplayValue> getMetrics()
           
 java.lang.String getMetricSource()
           
 int getMetricSourceId()
           
 double[] getMetricValueDoubles()
           
 MetricDisplayValue getMinMetric()
           
 int getNumberCollecting()
           
 java.lang.Integer getScheduleId()
           
 java.lang.Boolean getShowNumberCollecting()
          Returns the showNumberCollecting.
 MetricDisplayValue getSummaryMetric()
           
 java.lang.String getUnits()
          Method getIntervalUnits.
 void setBeginTimeFrame(java.lang.Long beginTimeFrame)
          Method setBeginTimeFrame.
 void setCollectionType(java.lang.Integer collectionType)
           
 void setDefinitionId(java.lang.Integer definitionId)
           
 void setDescription(java.lang.String description)
           
 void setEndTimeFrame(java.lang.Long endTimeFrame)
          Method setEndTimeFrame.
 void setLabel(java.lang.String label)
          Method setLabel.
 void setMetric(java.lang.String key, MetricDisplayValue value)
           
 void setMetrics(java.util.Map<java.lang.String,MetricDisplayValue> metrics)
           
 void setMetricSource(java.lang.String string)
           
 void setMetricSourceId(int id)
           
 void setNumberCollecting(int numberCollecting)
           
 void setScheduleId(java.lang.Integer scheduleId)
          Sets the scheduleId.
 void setShowNumberCollecting(java.lang.Boolean showNumberCollecting)
          Sets the showNumberCollecting.
 void setUnits(java.lang.String units)
          Method setIntervalUnits.
 java.lang.String toString()
           
 
Methods inherited from class org.rhq.enterprise.server.measurement.uibean.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 java.util.List<java.lang.String> attrKeyList
Constructor Detail

BaseMetricDisplay

public BaseMetricDisplay()
Constructor for MetricDisplaySummary.

Method Detail

getMetricValueDoubles

public double[] getMetricValueDoubles()

getMetricKeys

public java.lang.String[] getMetricKeys()

setMetric

public void setMetric(java.lang.String key,
                      MetricDisplayValue value)

getMetric

public MetricDisplayValue getMetric(java.lang.String key)

getMetrics

public java.util.Map<java.lang.String,MetricDisplayValue> getMetrics()

setMetrics

public void setMetrics(java.util.Map<java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.String getLabel()
Method getLabel. The name of the metric as it is displayed, perhaps the "alias"

Returns:
String

setLabel

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

Parameters:
label - The label to set

getUnits

public java.lang.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(java.lang.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 java.lang.Integer getCollectionType()
Get the collection type for the metrics. This value matches to MeasurementConstants.COLL_TYPE_*


setCollectionType

public void setCollectionType(java.lang.Integer collectionType)

getScheduleId

public java.lang.Integer getScheduleId()
Returns:
Integer

setScheduleId

public void setScheduleId(java.lang.Integer scheduleId)
Sets the scheduleId.

Parameters:
scheduleId - The scheduleId to set

getDefinitionId

public java.lang.Integer getDefinitionId()

setDefinitionId

public void setDefinitionId(java.lang.Integer definitionId)

getShowNumberCollecting

public java.lang.Boolean getShowNumberCollecting()
Returns the showNumberCollecting.

Returns:
boolean

getMetricSource

public java.lang.String getMetricSource()

setMetricSource

public void setMetricSource(java.lang.String string)

getMetricSourceId

public int getMetricSourceId()

setMetricSourceId

public void setMetricSourceId(int id)

setShowNumberCollecting

public void setShowNumberCollecting(java.lang.Boolean showNumberCollecting)
Sets the showNumberCollecting.

Parameters:
showNumberCollecting - The showNumberCollecting to set

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

toString

public java.lang.String toString()
Overrides:
toString in class MeasurementSummary

compareTo

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

getNumberCollecting

public int getNumberCollecting()
Returns:
the numberCollecting

setNumberCollecting

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


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