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

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

public class JmxCollectorSimple
extends JmxCollectorBase

JmxCollector for tests. Doesn't use JmxWorker to collect data from MBeans. It uses a private JmxProxy object for jmx interaction, but this object is not threaded.

Author:
danesa

Field Summary
protected  int nb
          Number of collectors for a given indicator (the current one) and a given probe.
 
Fields inherited from class org.ow2.jasmine.probe.collectors.jmx.internal.JmxCollectorBase
logger
 
Fields inherited from class org.ow2.jasmine.probe.collectors.JCollector
hostName, indicator, MISC_TARGET, NO_TARGET, period, probeId, probeManager
 
Constructor Summary
JmxCollectorSimple(String probeId, JasmineIndicator indicator, int period, String mbean, String csv)
          Constructor
 
Method Summary
 JasmineIndicatorValue getLastResult()
           
 void remove()
          Mark collector as removed.
protected  void setJmxConnectionService(JmxConnectionService jmxConnectionService)
           
protected  void setTarget(JasmineTarget target)
           
 void startPolling()
          Start polling
 void stopPolling()
          Stop polling
 
Methods inherited from class org.ow2.jasmine.probe.collectors.jmx.internal.JmxCollectorBase
getAttrlist, getJiv, getObjectName, getPattern, hasAttributes
 
Methods inherited from class org.ow2.jasmine.probe.collectors.JCollector
addJsr, addLongJsr, addLongValues, addValues, averageJsr, diffJsr, diffLongValues, diffValues, divideJsr, divideLongValues, divideValues, getDefaultTarget, getDomainName, getIndicator, getIndicatorName, getJsr, getProbeId, getServerName, isRemoved, jsrProps, longValue, maxJsr, minJsr, multiplyJsr, multiplyLongValues, multiplyValues, setProbeManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nb

protected int nb
Number of collectors for a given indicator (the current one) and a given probe. By default, one collector for an indicator and a probe. If the same indicator is used several times in that probe, nb will be incremented to the number of usages

Constructor Detail

JmxCollectorSimple

public JmxCollectorSimple(String probeId,
                          JasmineIndicator indicator,
                          int period,
                          String mbean,
                          String csv)
                   throws JasmineCollectorException
Constructor

Parameters:
probeId - probe Identifier
indicator - JasmineIndicator definition
period - in seconds
mbean - MBean pattern
csv - CSV list of attributes
Throws:
JasmineCollectorException
Method Detail

getLastResult

public JasmineIndicatorValue getLastResult()
                                    throws JasmineCollectorException
Specified by:
getLastResult in interface JasmineCollector
Specified by:
getLastResult in class JCollector
Throws:
JasmineCollectorException

startPolling

public void startPolling()
Start polling

Specified by:
startPolling in interface JasmineCollector
Specified by:
startPolling in class JCollector

stopPolling

public void stopPolling()
Stop polling

Specified by:
stopPolling in interface JasmineCollector
Specified by:
stopPolling in class JCollector

remove

public void remove()
Mark collector as removed. Called when a JasmineCollectorService stops.

Specified by:
remove in interface JasmineCollector
Overrides:
remove in class JCollector

setJmxConnectionService

protected void setJmxConnectionService(JmxConnectionService jmxConnectionService)

setTarget

protected void setTarget(JasmineTarget target)


Copyright © 2012 OW2 Consortium. All Rights Reserved.