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

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

public abstract class JmxCollectorBase
extends JCollector

Base class for regular JmxCollector and JmxCollector for tests.

Author:
danesa

Field Summary
protected  org.ow2.util.log.Log logger
           
 
Fields inherited from class org.ow2.jasmine.probe.collectors.JCollector
hostName, indicator, MISC_TARGET, NO_TARGET, period, probeId, probeManager
 
Constructor Summary
JmxCollectorBase(String probeId, JasmineIndicator indicator, int period, String mbean, String csv)
          Constructor
 
Method Summary
 List<String> getAttrlist()
          Getter for attrlist (list of provided attribute and or fragment names).
protected  JasmineIndicatorValue getJiv(String name, String probeId, int scale, List<Metric> metrics)
          Create a JIV on the basis of collected metrics.
 ObjectName getObjectName()
           
 String getPattern()
           
protected  boolean hasAttributes()
          Allows to know if attributes and/or fragments are provided by the indicator definition.
 
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, getLastResult, getProbeId, getServerName, isRemoved, jsrProps, longValue, maxJsr, minJsr, multiplyJsr, multiplyLongValues, multiplyValues, remove, setProbeManager, startPolling, stopPolling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

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

JmxCollectorBase

public JmxCollectorBase(String probeId,
                        JasmineIndicator indicator,
                        int period,
                        String mbean,
                        String csv)
Constructor

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

getPattern

public String getPattern()

getAttrlist

public List<String> getAttrlist()
Getter for attrlist (list of provided attribute and or fragment names).

Returns:
return the provided attribute and or fragment names.

getObjectName

public ObjectName getObjectName()
                         throws JasmineCollectorException
Returns:
The ObjectName instance corresponding to the mbean pattern provided in the indicator definition.
Throws:
JasmineCollectorException - an ObjectName could not be obtained as the pattern in not well formed given the JMX naming conventions.

hasAttributes

protected boolean hasAttributes()
Allows to know if attributes and/or fragments are provided by the indicator definition.

Returns:
true if attributes and or fragments are provided by the indicator definition.

getJiv

protected JasmineIndicatorValue getJiv(String name,
                                       String probeId,
                                       int scale,
                                       List<Metric> metrics)
                                throws JasmineCollectorException
Create a JIV on the basis of collected metrics.

Parameters:
name - the value name
probeId - the id of the probe
scale - a scale to apply to the value
metrics - the metrics to use to construct the value
Returns:
the created JIV
Throws:
JasmineCollectorException


Copyright © 2012 OW2 Consortium. All Rights Reserved.