Class AbstractMXBeanSampler

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

public abstract class AbstractMXBeanSampler extends 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 Details

    • AbstractMXBeanSampler

      public AbstractMXBeanSampler()
      Empty constructor.
  • Method Details

    • sample

      public final void sample(IMonitoringController monitoringController) throws Exception
      Perform one measurement with potential multiple records.
      Specified by:
      sample in interface ISampler
      Parameters:
      monitoringController - The monitoring controller for this probe.
      Throws:
      Exception - depending on the concrete sampler different exceptions can be raised
    • createNewMonitoringRecords

      protected abstract IMonitoringRecord[] createNewMonitoringRecords(long timestamp, String hostname, 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