com.businessobjects.sdk.monitoring.probe
Class HealthProbeResult

java.lang.Object
  extended by com.businessobjects.sdk.monitoring.probe.HealthProbeResult
All Implemented Interfaces:
IHealthProbeResult, IProbeResult

public class HealthProbeResult
extends java.lang.Object
implements IHealthProbeResult

This class is used to represent the result of a Health Probe.


Constructor Summary
HealthProbeResult(IProbeInfoObject healthProbe)
          This constructor is used to get the InfoObject which represents the Health Probe and initializes all variables for the result.
 
Method Summary
 java.lang.String getDescription()
          This method is used to retrieve the description of the probe.
 long getDuration()
          This method is used to retrieve the probe execution time in seconds.
 java.lang.String getName()
          This method is used to retrieve the name of the probe.
 IProbeInfoObject getProbeInfoObject()
          This method is used to get the Probe InfoObject.
 java.util.Map getProbeMetrics()
          This method is used to get the map of the Virtual Metrics.
 boolean getResult()
          This method is used to retrieve the probe result.
 boolean isTimedOut()
          This method is used to know if the probe is timed out.
 void probeFailed()
          This method is used to indicate the status - probe execution failed.
 void probeSucceeded()
          This method is used to indicate the status - probe execution succeeded.
 void probeTimedout()
          This method is used when the probe is timed out.
 void setDebugMessage(java.lang.String message)
          This method is used to set the debug messages when the probe is run.
 void setDescription(java.lang.String description)
          This method is used to set the description of the probe.
 void setDuration(long duration)
          This method is used to set the execution time of the probe.
 void setErrorMessage(java.lang.String errorMessage)
          This method is used to set the error messages when the probe is executed.
 void setException(java.lang.Exception ex)
          This method is used to set the exception for the probe.
 void setName(java.lang.String name)
          This method is used to set the name of the probe.
 void setProbeInfoObject(IProbeInfoObject probeInfoObject)
          This method is used to set the Probe InfoObject.
 void setProbeMetrics(java.lang.String name, java.lang.Object value)
          This method is used to set the value for a Virtual Metric.
 void setProbeMetricsMap(java.util.Map map)
          This method is used to set the probe metrics map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HealthProbeResult

public HealthProbeResult(IProbeInfoObject healthProbe)

This constructor is used to get the InfoObject which represents the Health Probe and initializes all variables for the result.

Parameters:
healthProbe - probe InfoObject
Method Detail

probeFailed

public void probeFailed()
Description copied from interface: IProbeResult

This method is used to indicate the status - probe execution failed.

Specified by:
probeFailed in interface IProbeResult

probeSucceeded

public void probeSucceeded()
Description copied from interface: IProbeResult

This method is used to indicate the status - probe execution succeeded.

Specified by:
probeSucceeded in interface IProbeResult

setDuration

public void setDuration(long duration)
Description copied from interface: IProbeResult

This method is used to set the execution time of the probe.

Specified by:
setDuration in interface IProbeResult
Parameters:
duration - Time in seconds for the execution of probe

getName

public java.lang.String getName()

This method is used to retrieve the name of the probe.

Returns:
name of the probe

setName

public void setName(java.lang.String name)

This method is used to set the name of the probe.

Specified by:
setName in interface IProbeResult
Parameters:
name - probe name

getDescription

public java.lang.String getDescription()

This method is used to retrieve the description of the probe.

Returns:
description of the probe

setDescription

public void setDescription(java.lang.String description)

This method is used to set the description of the probe.

Specified by:
setDescription in interface IProbeResult
Parameters:
description - probe description

setProbeMetrics

public void setProbeMetrics(java.lang.String name,
                            java.lang.Object value)
                     throws MonitoringException,
                            SDKException
Description copied from interface: IHealthProbeResult

This method is used to set the value for a Virtual Metric.

Specified by:
setProbeMetrics in interface IHealthProbeResult
Parameters:
name - name of the metric
value - value of the metric
Throws:
MonitoringException - MetricsNotFound.
SDKException - An SDKException

setProbeMetricsMap

public void setProbeMetricsMap(java.util.Map map)
                        throws SDKException
Description copied from interface: IHealthProbeResult

This method is used to set the probe metrics map.

Specified by:
setProbeMetricsMap in interface IHealthProbeResult
Parameters:
map - virtual metrics map
Throws:
SDKException - SDKException

getProbeMetrics

public java.util.Map getProbeMetrics()
Description copied from interface: IHealthProbeResult

This method is used to get the map of the Virtual Metrics.

Specified by:
getProbeMetrics in interface IHealthProbeResult
Returns:
Map of the Virtual Metrics

setErrorMessage

public void setErrorMessage(java.lang.String errorMessage)
Description copied from interface: IProbeResult

This method is used to set the error messages when the probe is executed.

Specified by:
setErrorMessage in interface IProbeResult
Parameters:
errorMessage - Error message returned when the probe is executed.

setException

public void setException(java.lang.Exception ex)

This method is used to set the exception for the probe.

Specified by:
setException in interface IProbeResult
Parameters:
ex - Exception thrown when the probe is made to run

setDebugMessage

public void setDebugMessage(java.lang.String message)

This method is used to set the debug messages when the probe is run.

Parameters:
message - debug message to be returned when the probe is run.

getDuration

public long getDuration()
Description copied from interface: IProbeResult

This method is used to retrieve the probe execution time in seconds.

Specified by:
getDuration in interface IProbeResult
Returns:
Probe execution time in seconds

getResult

public boolean getResult()
Description copied from interface: IProbeResult

This method is used to retrieve the probe result.

Specified by:
getResult in interface IProbeResult
Returns:
Probe Result

probeTimedout

public void probeTimedout()
Description copied from interface: IProbeResult

This method is used when the probe is timed out.

Specified by:
probeTimedout in interface IProbeResult

isTimedOut

public boolean isTimedOut()
Description copied from interface: IProbeResult

This method is used to know if the probe is timed out.

Specified by:
isTimedOut in interface IProbeResult
Returns:
True, if the probe is timed out, false otherwise.

setProbeInfoObject

public void setProbeInfoObject(IProbeInfoObject probeInfoObject)
Description copied from interface: IHealthProbeResult

This method is used to set the Probe InfoObject.

Specified by:
setProbeInfoObject in interface IHealthProbeResult
Parameters:
probeInfoObject - Info Object of the health probe

getProbeInfoObject

public IProbeInfoObject getProbeInfoObject()
Description copied from interface: IHealthProbeResult
This method is used to get the Probe InfoObject.

Specified by:
getProbeInfoObject in interface IHealthProbeResult
Returns:
ProbeInfoObject