org.opengroup.arm40.metric
Interface ArmMetricGroup

All Superinterfaces:
ArmInterface
All Known Implementing Classes:
ArmMetricGroup

public interface ArmMetricGroup
extends ArmInterface

Is used to bind objects that implement a subclass of ArmMetric to an ArmTransactionWithMetricsDefinition or ArmTranReportWithMetricsDefinition object. The binding occurs when the transaction object is created using newArmTransactionWithMetrics() or newArmTranReportWithMetrics() and is immutable afterwards.

For all methods taking an index parameter, this is the index into the ArmMetric array. It must have a value in the range 0:6. To remain consistent with ARM 2.0, any ArmMetric subclass except ArmMetricString32 can be assigned to elements 0:5 and only ArmMetricString32 can be assigned to element 6.

Objects implementing this interface are created using ArmMetricFactory.newArmMetricGroup(org.opengroup.arm40.metric.ArmMetricGroupDefinition, org.opengroup.arm40.metric.ArmMetric[]).

Author:
ARM Working Group of The Open Group

Method Summary
 ArmMetricGroupDefinition getDefinition()
           
 ArmMetric getMetric(int index)
           
 boolean isMetricValid(int index)
           
 int setMetricValid(int index, boolean value)
          Indicates whether an ArmMetric subclass at this array index is valid.
 
Methods inherited from interface org.opengroup.arm40.transaction.ArmInterface
getErrorCode, getErrorMessage, setErrorCode
 

Method Detail

getDefinition

ArmMetricGroupDefinition getDefinition()
Returns:
the metric group definition used to create this object.

getMetric

ArmMetric getMetric(int index)
Parameters:
index - the index into the ArmMetric array. See comment in the interface description above.
Returns:
the metric at the array index. This value may be null.

isMetricValid

boolean isMetricValid(int index)
Parameters:
index - the index into the ArmMetric array. See comment in the interface description above.
Returns:
whether an ArmMetric subclass at this array index is valid.

setMetricValid

int setMetricValid(int index,
                   boolean value)
Indicates whether an ArmMetric subclass at this array index is valid. This applies when any of the following calls are made:

Parameters:
index - index the index into the ArmMetric array. See comment in the interface description above.
value - If the valid flag is set then the metric value is processed.
Returns:
0 on sucess; otherwise, a non-zero error code is returned (as specified in ArmInterface).