Package org.opennms.netmgt.jmx.impl
Class DefaultJmxCollector
- java.lang.Object
-
- org.opennms.netmgt.jmx.impl.DefaultJmxCollector
-
- All Implemented Interfaces:
JmxCollector
public class DefaultJmxCollector extends Object implements JmxCollector
A implementation of the JmxCollector. It iterates over all configured MBeans, collects either attributes or composite members and creates a sample accordingly.- See Also:
JmxCollector
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description DefaultJmxCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollect(JmxCollectorConfig config, MBeanServer mBeanServer, JmxSampleProcessor sampleProcessor)Implements the logic for the jmx data collection.
-
-
-
Method Detail
-
collect
public void collect(JmxCollectorConfig config, MBeanServer mBeanServer, JmxSampleProcessor sampleProcessor) throws JmxServerConnectionException
Description copied from interface:JmxCollectorImplements the logic for the jmx data collection. Therefore it should somehow: 1. establish the connection to the configured ip address. 2. collect the configured data. 3. inform theJmxSampleProcessorabout the collected data. TheJmxSampleProcessoris a callback for each sample collected. Therefore each sample can be transformed to another data structure (e.g. collectd).- Specified by:
collectin interfaceJmxCollector- Parameters:
config- The configuration to use for the collection.sampleProcessor- The callback to process each sample.- Throws:
JmxServerConnectionException- If the connection to the jmx server could not be established (whatever the reason).
-
-