|
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 |
java.lang.Objectorg.hyperic.hq.agent.AgentRemoteValue
public class AgentRemoteValue
An object representing key/value pairs to be passed to, and returned from, remote method calls. This object provides a way for values to be sent and received in a way which abstracts the serialization or protocol implementation.
Constructor Summary | |
---|---|
AgentRemoteValue()
Create a new AgentRemoteValue object with default innards. |
|
AgentRemoteValue(java.lang.String[][] keyvals)
Create a new AgentRemoteValue object with some default key/value pairs. |
Method Summary | |
---|---|
static AgentRemoteValue |
fromStream(java.io.DataInput is)
|
java.util.Set |
getKeys()
|
java.lang.String |
getValue(java.lang.String key)
Retrieve a value based on the key. |
double |
getValueAsDouble(java.lang.String key)
Get a value, interpreted as a double. |
int |
getValueAsInt(java.lang.String key)
Get a value, interpreted as an integer. |
long |
getValueAsLong(java.lang.String key)
Get a value, interpreted as a long integer. |
void |
readExternal(java.io.ObjectInput in)
|
void |
setValue(java.lang.String key,
java.lang.String val)
Setup a key/value pair. |
void |
toStream(java.io.DataOutput os)
|
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AgentRemoteValue()
public AgentRemoteValue(java.lang.String[][] keyvals) throws java.lang.IllegalArgumentException
keyvals
- an array of arrays containing 2 elements. The first
element is the key, and the second is its associated
value.
java.lang.IllegalArgumentException
- indicating the passed array contained
sub-arrays of size != 2.Method Detail |
---|
public void setValue(java.lang.String key, java.lang.String val)
setValue
in interface GenericValueMap
key
- Key to assign the value toval
- Value to assign to the keypublic java.lang.String getValue(java.lang.String key)
getValue
in interface GenericValueMap
key
- Key for which to get the value.
public long getValueAsLong(java.lang.String key) throws AgentRemoteException
key
- Key for which to get the value.
AgentRemoteException
- if the value cannot be interpted as a long.public double getValueAsDouble(java.lang.String key) throws AgentRemoteException
key
- Key for which to get the value.
AgentRemoteException
- if the value cannot be interpted as double.public int getValueAsInt(java.lang.String key) throws AgentRemoteException
key
- Key for which to get the value.
AgentRemoteException
- if the value cannot be interpted as an int.public void toStream(java.io.DataOutput os) throws java.io.IOException
java.io.IOException
public java.util.Set getKeys()
getKeys
in interface GenericValueMap
public static AgentRemoteValue fromStream(java.io.DataInput is) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
|
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 |