Class DefaultMonitoringConfig<E>

java.lang.Object
org.glassfish.grizzly.monitoring.DefaultMonitoringConfig<E>
All Implemented Interfaces:
MonitoringConfig<E>

public class DefaultMonitoringConfig<E> extends Object implements MonitoringConfig<E>
Default monitoring configuration, with no JMX support. The createManagementObject() method returns null, so if a child class requires JMX support, it has to implement this method properly.
Author:
Alexey Stashok
  • Constructor Details

    • DefaultMonitoringConfig

      public DefaultMonitoringConfig(Class<E> clazz)
  • Method Details

    • addProbes

      public final void addProbes(E... probes)
      Add the monitoring probes, which will be notified about object's lifecycle events.
      Specified by:
      addProbes in interface MonitoringConfig<E>
      Parameters:
      probes - the monitoring probes.
    • removeProbes

      public final boolean removeProbes(E... probes)
      Remove the monitoring probes.
      Specified by:
      removeProbes in interface MonitoringConfig<E>
      Parameters:
      probes - the monitoring probes.
    • getProbes

      public final E[] getProbes()
      Get the the monitoring probes, which are registered on the objet. Please note, it's not appropriate to modify the returned array's content. Please use MonitoringConfig.addProbes(Object[]) and MonitoringConfig.removeProbes(Object[]) instead.
      Specified by:
      getProbes in interface MonitoringConfig<E>
      Returns:
      the the monitoring probes, which are registered on the object.
    • getProbesUnsafe

      public final E[] getProbesUnsafe()
      Get the monitoring probes array (direct).
      Returns:
      the monitoring probes array (direct).
    • hasProbes

      public boolean hasProbes()
      Specified by:
      hasProbes in interface MonitoringConfig<E>
    • clearProbes

      public final void clearProbes()
      Removes all the monitoring probes, which are registered on the object.
      Specified by:
      clearProbes in interface MonitoringConfig<E>
    • createManagementObject

      public Object createManagementObject()
      Create the JMX Object, which represents this object.
      Specified by:
      createManagementObject in interface MonitoringConfig<E>
      Returns:
      the JMX Object, which represents this object.