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 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

    Constructors 
    Constructor Description
    AbstractMXBeanSampler()
    Empty constructor.
  • Method Summary

    Modifier and Type Method Description
    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 Details

  • Method Details

    • 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