org.hyperic.hq.measurement.agent.commands
Class GetMeasurements_result
java.lang.Object
org.hyperic.hq.agent.AgentRemoteValue
org.hyperic.hq.measurement.agent.commands.GetMeasurements_result
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, GenericValueMap
public class GetMeasurements_result
- extends AgentRemoteValue
The result object from the GetMeasurements command. This is a tricky
object, since it can potentially represent 2 different types of
values: MeasurementValues and Exceptions. Since GetMeasurements can
retrieve multiple measurements at once, any one may fail, and therefore
the caller should know if an exception occurred while retrieving it.
The caller should invoke obj.getException() if obj.getMeasurement() returns
null, to get the exception message.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GetMeasurements_result
public GetMeasurements_result()
GetMeasurements_result
public GetMeasurements_result(AgentRemoteValue args)
throws AgentRemoteException
- Throws:
AgentRemoteException
getNumMeasurements
public int getNumMeasurements()
addException
public void addException(java.lang.String excMsg)
addMeasurement
public void addMeasurement(MetricValue val)
setValue
public void setValue(java.lang.String key,
java.lang.String val)
- Description copied from class:
AgentRemoteValue
- Setup a key/value pair.
- Specified by:
setValue
in interface GenericValueMap
- Overrides:
setValue
in class AgentRemoteValue
- Parameters:
key
- Key to assign the value toval
- Value to assign to the key
getException
public java.lang.String getException(int measNum)
getMeasurement
public MetricValue getMeasurement(int measNum)
Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.