org.ow2.jasmine.probe.collectors
Class ConstantCollector

java.lang.Object
  extended by org.ow2.jasmine.probe.collectors.JCollector
      extended by org.ow2.jasmine.probe.collectors.ConstantCollector
All Implemented Interfaces:
org.ow2.jasmine.probe.collector.JasmineCollector

public class ConstantCollector
extends JCollector

Dummy Collector for constant values This Collector return always the same value

Author:
durieuxp

Field Summary
 
Fields inherited from class org.ow2.jasmine.probe.collectors.JCollector
indicator, logger, name, period
 
Constructor Summary
ConstantCollector(java.lang.String name, org.ow2.jasmine.probe.JasmineIndicator indic, int period)
          Constructor
 
Method Summary
 org.ow2.jasmine.probe.JasmineIndicatorValue getLastResult()
          return the last result for this indicator
 void startPolling()
          Start polling
 void stopPolling()
          Stop polling
 
Methods inherited from class org.ow2.jasmine.probe.collectors.JCollector
addValues, diffValues, divideValues, getIndicator, getName, longValue, multiplyValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantCollector

public ConstantCollector(java.lang.String name,
                         org.ow2.jasmine.probe.JasmineIndicator indic,
                         int period)
Constructor

Parameters:
name - is the value as a String
indic -
period - not used
Method Detail

getLastResult

public org.ow2.jasmine.probe.JasmineIndicatorValue getLastResult()
                                                          throws org.ow2.jasmine.probe.collector.JasmineCollectorException
return the last result for this indicator

Specified by:
getLastResult in interface org.ow2.jasmine.probe.collector.JasmineCollector
Specified by:
getLastResult in class JCollector
Returns:
JasmineIndicatorValue or null if no value available
Throws:
org.ow2.jasmine.probe.collector.JasmineCollectorException

stopPolling

public void stopPolling()
Stop polling

Specified by:
stopPolling in interface org.ow2.jasmine.probe.collector.JasmineCollector
Specified by:
stopPolling in class JCollector

startPolling

public void startPolling()
Start polling

Specified by:
startPolling in interface org.ow2.jasmine.probe.collector.JasmineCollector
Specified by:
startPolling in class JCollector


Copyright © 2011 OW2 Consortium. All Rights Reserved.