org.ow2.jasmine.probe.manager
Class JProbe

java.lang.Object
  extended by org.ow2.jasmine.probe.manager.JProbe
All Implemented Interfaces:
Runnable

public class JProbe
extends Object
implements Runnable

This object represents a Running Probe.

Author:
durieuxp

Field Summary
protected static org.ow2.util.log.Log logger
           
 
Constructor Summary
JProbe(JasmineProbe def, JProbeManager mgr)
          Constructor
 
Method Summary
 JasmineProbe getProbeDef()
           
 int getStatus()
          Get the Probe status, kept in the JasmineProbe object for convenience.
 boolean isRunning()
           
 void resetIndicators()
          Not only reset collectors list, but insure that collector instances are removed from the collector service.
 void resetOutputs()
          Clear outers list.
 void resetTarget(JasmineTarget target)
          Allow to recreate a target .
 void resetTargets()
          Allow to change a probe's target.
 void resetTimer()
          reset timer value with probe period
 void resume()
          Start the Probe, or resume it if it was previously suspended.
 void run()
          Called by the Scheduler to make a polling on all indicators
 void setError(String mess)
          Set the Probe error message, kept in the JasmineProbe object for convenience.
 void setStatus(int state)
          Set the Probe status, kept in the JasmineProbe object for convenience.
 boolean suspend()
          Suspend the Probe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.ow2.util.log.Log logger
Constructor Detail

JProbe

public JProbe(JasmineProbe def,
              JProbeManager mgr)
Constructor

Method Detail

getProbeDef

public JasmineProbe getProbeDef()

getStatus

public int getStatus()
Get the Probe status, kept in the JasmineProbe object for convenience.

Returns:
the probe status

setStatus

public void setStatus(int state)
Set the Probe status, kept in the JasmineProbe object for convenience.

Parameters:
state - the probe status

setError

public void setError(String mess)
Set the Probe error message, kept in the JasmineProbe object for convenience.

Parameters:
mess - the error message

isRunning

public boolean isRunning()
Returns:
true if probe is running

resume

public void resume()
            throws JasmineProbeException
Start the Probe, or resume it if it was previously suspended.

Throws:
JasmineProbeException

resetTimer

public void resetTimer()
reset timer value with probe period


resetIndicators

public void resetIndicators()
Not only reset collectors list, but insure that collector instances are removed from the collector service.


resetOutputs

public void resetOutputs()
Clear outers list.


resetTargets

public void resetTargets()
Allow to change a probe's target.


resetTarget

public void resetTarget(JasmineTarget target)
Allow to recreate a target .

Parameters:
target - the new definition

suspend

public boolean suspend()
Suspend the Probe. It may be restarted later by resume().

Returns:
true if probe was running

run

public void run()
Called by the Scheduler to make a polling on all indicators

Specified by:
run in interface Runnable


Copyright © 2013 OW2 Consortium. All Rights Reserved.