@Deprecated class DefaultProbe extends Object implements Probe
A probe must not be invasive and the agent is able to ignore them (ie. to not provide information).
Constructor and Description |
---|
DefaultProbe(Agent agent)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
clearProbeValues()
Deprecated.
Remove all the values.
|
<T> T[] |
getProbeArray(String probeName,
Class<T> clazz)
Deprecated.
Replies a probed value.
|
boolean |
getProbeBool(String probeName)
Deprecated.
Replies a probed value as boolean (if possible).
|
char |
getProbeChar(String probeName)
Deprecated.
Replies a probed value as character (if possible).
|
AgentIdentifier |
getProbedAgentId()
Deprecated.
Replies the identifier of the probed agent.
|
double |
getProbeDouble(String probeName)
Deprecated.
Replies a probed value as double (if possible).
|
float |
getProbeFloat(String probeName)
Deprecated.
Replies a probed value as float (if possible).
|
int |
getProbeInt(String probeName)
Deprecated.
Replies a probed value as integer (if possible).
|
long |
getProbeLong(String probeName)
Deprecated.
Replies a probed value as integer (if possible).
|
String[] |
getProbeNames()
Deprecated.
Replies the names of the probed values inside the agent.
|
String |
getProbeString(String probeName)
Deprecated.
Replies a probed value as string (if possible).
|
protected Object |
getProbeValue(String probeName)
Deprecated.
Replies a probed value.
|
<T> T |
getProbeValue(String probeName,
Class<T> clazz)
Deprecated.
Replies a probed value.
|
boolean |
hasProbeValue(String probeName)
Deprecated.
Replies if the specified probe value exists.
|
boolean |
hasProbeValues()
Deprecated.
Replies if this probe contains a value.
|
boolean |
isProbedAgentAlive()
Deprecated.
Replies if the agent is alive.
|
void |
putProbeValue(String probeName,
Object value)
Deprecated.
Store the value associated to a probe name.
|
void |
removeProbeValue(String probeName)
Deprecated.
Remove a value from this probe.
|
DefaultProbe(Agent agent)
public final String[] getProbeNames()
getProbeNames
in interface Probe
protected Object getProbeValue(String probeName)
probeName
- is the name of the probed valuepublic <T> T[] getProbeArray(String probeName, Class<T> clazz)
This method permits to force the type of the value.
getProbeArray
in interface Probe
T
- is the type of the value to reply.probeName
- is the name of the probed value.clazz
- is the type of the expected value.null
public void putProbeValue(String probeName, Object value)
This method is generally invoked from the agent.
probeName
- is the name of the probed value.value
- is the value of the probe.public void removeProbeValue(String probeName)
probeName
- is the name of the probed value.public void clearProbeValues()
public boolean hasProbeValues()
hasProbeValues
in interface Probe
true
if a probe value exists, otherwise false
public final <T> T getProbeValue(String probeName, Class<T> clazz)
This method permits to force the type of the value.
getProbeValue
in interface Probe
T
- is the type of the value to reply.probeName
- is the name of the probed value.clazz
- is the type of the expected value.null
public final int getProbeInt(String probeName) throws ProbeValueNotDefinedException
getProbeInt
in interface Probe
probeName
- is the name of the probed value.null
ProbeValueNotDefinedException
public final long getProbeLong(String probeName) throws ProbeValueNotDefinedException
getProbeLong
in interface Probe
probeName
- is the name of the probed value.null
ProbeValueNotDefinedException
public final float getProbeFloat(String probeName) throws ProbeValueNotDefinedException
getProbeFloat
in interface Probe
probeName
- is the name of the probed value.null
ProbeValueNotDefinedException
public final double getProbeDouble(String probeName) throws ProbeValueNotDefinedException
getProbeDouble
in interface Probe
probeName
- is the name of the probed value.null
ProbeValueNotDefinedException
public final boolean getProbeBool(String probeName) throws ProbeValueNotDefinedException
getProbeBool
in interface Probe
probeName
- is the name of the probed value.null
ProbeValueNotDefinedException
public final char getProbeChar(String probeName) throws ProbeValueNotDefinedException
getProbeChar
in interface Probe
probeName
- is the name of the probed value.null
ProbeValueNotDefinedException
public final String getProbeString(String probeName) throws ProbeValueNotDefinedException
getProbeString
in interface Probe
probeName
- is the name of the probed value.null
ProbeValueNotDefinedException
public boolean isProbedAgentAlive()
isProbedAgentAlive
in interface Probe
true
if the agent associated to this probe is alive, otherwise false
public AgentIdentifier getProbedAgentId()
getProbedAgentId
in interface Probe
public boolean hasProbeValue(String probeName)
hasProbeValue
in interface Probe
probeName
- is the value name to test.true
if a probe value exists, otherwise false
Copyright © 2003-2013 Arakhnê.org Members. All rights reserved under LGPL license terms.