com.jfw.probe
Class ProbeStatus

java.lang.Object
  extended by com.jfw.probe.ProbeStatus

public final class ProbeStatus
extends java.lang.Object

Manage status informations for the probes.
Is a singleton, instance is returned by getInstance().


Field Summary
static java.lang.String STATUS_KEY
          The key used in status.
static java.lang.String STATUS_KO
          A value for STATUS_KEY.
static java.lang.String STATUS_OK
          A value for STATUS_KEY.
static java.lang.String STATUS_TIME
          The key used in status.
 
Method Summary
 void deleteStatus(java.lang.String probeName)
          Remove a probe status from status.
 boolean exist(java.lang.String probeName)
          Check if exist the status of a probe.
static ProbeStatus getInstance()
          Get the unique instance.
 java.util.Set getProbeList()
          Get a Set object with keys of status.
 java.util.HashMap getStatus(java.lang.String probeName)
          Get the status of a probe.
 void setStatus(java.lang.String probeName, java.lang.String probeValue)
          Set the last status of a probe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_KEY

public static final java.lang.String STATUS_KEY
The key used in status.

See Also:
Constant Field Values

STATUS_TIME

public static final java.lang.String STATUS_TIME
The key used in status.

See Also:
Constant Field Values

STATUS_OK

public static final java.lang.String STATUS_OK
A value for STATUS_KEY.

See Also:
Constant Field Values

STATUS_KO

public static final java.lang.String STATUS_KO
A value for STATUS_KEY.

See Also:
Constant Field Values
Method Detail

getInstance

public static ProbeStatus getInstance()
Get the unique instance.

Returns:
the unique instance.

setStatus

public void setStatus(java.lang.String probeName,
                      java.lang.String probeValue)
Set the last status of a probe.

Parameters:
probeName - the name of the probe.
probeValue - the status of the probe. Possible values are STATUS_OK and STATUS_KO.

getStatus

public java.util.HashMap getStatus(java.lang.String probeName)
Get the status of a probe.

Parameters:
probeName - the name of the probe.
Returns:
a HashMap with keys:
  1. STATUS_KEY, the status of the last execution of the probe. Possible values are STATUS_OK and STATUS_KO.
  2. STATUS_TIME, the time is set the status.

deleteStatus

public void deleteStatus(java.lang.String probeName)
Remove a probe status from status.

Parameters:
probeName - the probe name to remove.

getProbeList

public java.util.Set getProbeList()
Get a Set object with keys of status.

Returns:
a Set object with keys of status.

exist

public boolean exist(java.lang.String probeName)
Check if exist the status of a probe.

Parameters:
probeName - the probe name to remove.
Returns:
true if probe status exist, false if not exist.