GetMeasurements_result (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.measurement.agent.commands.GetMeasurements_result class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`GetMeasurements_result()`
`GetMeasurements_result(AgentRemoteValue args)`

Method Summary
`void` | `addException(java.lang.String excMsg)`
`void` | `addMeasurement(MetricValue val)`
`java.lang.String` | `getException(int measNum)`
`MetricValue` | `getMeasurement(int measNum)`
`int` | `getNumMeasurements()`
`void` | `setValue(java.lang.String key, java.lang.String val)` Setup a key/value pair.

Methods inherited from class org.hyperic.hq.agent.AgentRemoteValue
`fromStream, getKeys, getValue, getValueAsDouble, getValueAsInt, getValueAsLong, readExternal, toStream, toString, writeExternal`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### GetMeasurements_result

    public GetMeasurements_result()

### GetMeasurements_result

    public GetMeasurements_result(AgentRemoteValue args)
                           throws AgentRemoteException

Throws:
  `AgentRemoteException`

Method Detail

### 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 to
    `val` - Value to assign to the key

### getException

    public java.lang.String getException(int measNum)

### getMeasurement

    public MetricValue getMeasurement(int measNum)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.