Class MonitoringFeature
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.MonitoringFeature
-
- All Implemented Interfaces:
Feature
public final class MonitoringFeature extends Object implements Feature
Feature that enables calculating ofmonitoring statisticsand optionally also enables exposure of monitoring MBeans.Calculation of
MonitoringStatisticsis necessary in order to expose monitoring MBeans, so by default this feature always enables calculation ofMonitoringStatistics. Additionally, the feature can be configured by settingtruetosetmBeansEnabled(boolean)in order to enable exposure of monitoring MBeans. The same can be achieved by configuration of a propertyServerProperties.MONITORING_STATISTICS_MBEANS_ENABLEDwhich overrides the setting defined by thesetmBeansEnabled(boolean)method.The MonitoringStatistics can be controlled also by definition of a property
When auto-discovery is enabled then monitoring statistics and exposure of MBeans can be controlled only by properties above without a need to explicitly register this feature.ServerProperties.MONITORING_STATISTICS_ENABLEDwhich overrides the registration of this feature.- Author:
- Miroslav Fuksa
- See Also:
for more details.
-
-
Constructor Summary
Constructors Constructor Description MonitoringFeature()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconfigure(FeatureContext context)voidsetmBeansEnabled(boolean mBeansEnabled)Set whether the feature should also enable exposure of monitoring statistics MBeans.
-
-
-
Method Detail
-
configure
public boolean configure(FeatureContext context)
-
setmBeansEnabled
public void setmBeansEnabled(boolean mBeansEnabled)
Set whether the feature should also enable exposure of monitoring statistics MBeans. The set value can be overwritten by the definition of the propertyServerProperties.MONITORING_STATISTICS_MBEANS_ENABLED.- Parameters:
mBeansEnabled-trueis monitoring MBeans should be exposed.
-
-