org.ow2.jasmine.probe.collectors.jmx.internal
Class JmxCollector

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

public class JmxCollector
extends org.ow2.jasmine.probe.collectors.JCollector

Collector implementation for JMX. This implementation works with a separate thread used to pre collect the results. Using a thread is interesting when we do not want to be stuck in case info cannot be got because the target is off.

Author:
durieuxp

Field Summary
 
Fields inherited from class org.ow2.jasmine.probe.collectors.JCollector
indicator, logger, name, period
 
Constructor Summary
JmxCollector(String name, org.ow2.jasmine.probe.JasmineIndicator indicator, int period, String mbean, String csv)
          Constructor
 
Method Summary
 void addResult(List<Metric> metrics)
          Add a new result to the list.
 String[] getAttributes()
          Get the list of attributes to fetch
 org.ow2.jasmine.probe.JasmineIndicValue getLastResult()
          Retrieve the last results for this indicator This method return a List of results in case indicator represents actually a list of value
 ObjectName getObjectName()
           
 boolean needResult()
          Check if this Collector needs a new result
 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

JmxCollector

public JmxCollector(String name,
                    org.ow2.jasmine.probe.JasmineIndicator indicator,
                    int period,
                    String mbean,
                    String csv)
Constructor

Parameters:
indicator - definition
Method Detail

getObjectName

public ObjectName getObjectName()
                         throws org.ow2.jasmine.probe.collector.JasmineCollectorException
Throws:
org.ow2.jasmine.probe.collector.JasmineCollectorException

getAttributes

public String[] getAttributes()
Get the list of attributes to fetch

Returns:

getLastResult

public org.ow2.jasmine.probe.JasmineIndicValue getLastResult()
                                                      throws org.ow2.jasmine.probe.collector.JasmineCollectorException
Retrieve the last results for this indicator This method return a List of results in case indicator represents actually a list of value

Specified by:
getLastResult in interface org.ow2.jasmine.probe.collector.JasmineCollector
Specified by:
getLastResult in class org.ow2.jasmine.probe.collectors.JCollector
Returns:
JasmineIndicValue
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 org.ow2.jasmine.probe.collectors.JCollector

needResult

public boolean needResult()
Check if this Collector needs a new result

Returns:
true if it needs one

addResult

public void addResult(List<Metric> metrics)
Add a new result to the list.

Parameters:
metrics -


Copyright © 2011 OW2 Consortium. All Rights Reserved.