Kieker 1.11

kieker.monitoring.sampler.mxbean
Class AbstractMXBeanSampler

java.lang.Object
  extended by kieker.monitoring.sampler.mxbean.AbstractMXBeanSampler
All Implemented Interfaces:
ISampler
Direct Known Subclasses:
ClassLoadingSampler, CompilationSampler, GCSampler, MemorySampler, ThreadsStatusSampler, UptimeSampler

public abstract class AbstractMXBeanSampler
extends java.lang.Object
implements ISampler

This is an abstract base for all sampler using the MXBean interface to access information from the JVM.

Since:
1.10
Author:
Nils Christian Ehmke

Constructor Summary
AbstractMXBeanSampler()
          Empty constructor.
 
Method Summary
protected abstract  IMonitoringRecord[] createNewMonitoringRecords(long timestamp, java.lang.String hostname, java.lang.String vmName, IMonitoringController monitoringCtr)
          Abstract method used as interface to realize concrete samplers.
 void sample(IMonitoringController monitoringController)
          Perform one measurement with potential multiple records.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMXBeanSampler

public AbstractMXBeanSampler()
Empty constructor.

Method Detail

sample

public final void sample(IMonitoringController monitoringController)
                  throws java.lang.Exception
Perform one measurement with potential multiple records.

Specified by:
sample in interface ISampler
Parameters:
monitoringController - The monitoring controller for this probe.
Throws:
java.lang.Exception - depending on the concrete sampler different exceptions can be raised

createNewMonitoringRecords

protected abstract IMonitoringRecord[] createNewMonitoringRecords(long timestamp,
                                                                  java.lang.String hostname,
                                                                  java.lang.String vmName,
                                                                  IMonitoringController monitoringCtr)
Abstract method used as interface to realize concrete samplers.

Parameters:
timestamp - the current time.
hostname - the hostname of the machine where this measurement is performed
vmName - name of the vm
monitoringCtr - monitoring controller used in the measurement
Returns:
returns an array of records containing the measurement

Kieker 1.11

Copyright 2015 Kieker Project, http://kieker-monitoring.net