Package org.glassfish.grizzly.monitoring
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. ThecreateManagementObject()method returns null, so if a child class requires JMX support, it has to implement this method properly.- Author:
- Alexey Stashok
-
-
Constructor Summary
Constructors Constructor Description DefaultMonitoringConfig(Class<E> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProbes(E... probes)Add the monitoring probes, which will be notified about object's lifecycle events.voidclearProbes()Removes all the monitoring probes, which are registered on the object.ObjectcreateManagementObject()Create the JMXObject, which represents this object.E[]getProbes()Get the the monitoring probes, which are registered on the objet.E[]getProbesUnsafe()Get the monitoring probes array (direct).booleanhasProbes()booleanremoveProbes(E... probes)Remove the monitoring probes.
-
-
-
Method Detail
-
addProbes
public final void addProbes(E... probes)
Add the monitoring probes, which will be notified about object's lifecycle events.- Specified by:
addProbesin interfaceMonitoringConfig<E>- Parameters:
probes- the monitoring probes.
-
removeProbes
public final boolean removeProbes(E... probes)
Remove the monitoring probes.- Specified by:
removeProbesin interfaceMonitoringConfig<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 useMonitoringConfig.addProbes(Object[])andMonitoringConfig.removeProbes(Object[])instead.- Specified by:
getProbesin interfaceMonitoringConfig<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:
hasProbesin interfaceMonitoringConfig<E>
-
clearProbes
public final void clearProbes()
Removes all the monitoring probes, which are registered on the object.- Specified by:
clearProbesin interfaceMonitoringConfig<E>
-
createManagementObject
public Object createManagementObject()
Create the JMXObject, which represents this object.- Specified by:
createManagementObjectin interfaceMonitoringConfig<E>- Returns:
- the JMX
Object, which represents this object.
-
-