Class ResourceMxBeanImpl
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.jmx.ResourceMxBeanImpl
-
- All Implemented Interfaces:
ResourceMXBean
public class ResourceMxBeanImpl extends java.lang.Object implements ResourceMXBean
MXBean implementing theResourceMethodMXBean
MXBean interface.
-
-
Field Summary
Fields Modifier and Type Field Description private MBeanExposer
mBeanExposer
private ExecutionStatisticsDynamicBean
methodsExecutionStatisticsBean
private java.lang.String
name
private ExecutionStatisticsDynamicBean
requestExecutionStatisticsBean
private java.util.Map<java.lang.String,ResourceMethodMXBeanImpl>
resourceMethods
private java.lang.String
resourcePropertyName
private boolean
uriResource
-
Constructor Summary
Constructors Constructor Description ResourceMxBeanImpl(ResourceStatistics resourceStatistics, java.lang.String name, boolean uriResource, MBeanExposer mBeanExposer, java.lang.String parentName)
Create and register new MXBean into the mbean server using themBeanExposer
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Get the name of the resource.void
updateResourceStatistics(ResourceStatistics resourceStatistics)
Update the statistics of this MXBean and of nested MXBeans.
-
-
-
Field Detail
-
name
private final java.lang.String name
-
methodsExecutionStatisticsBean
private volatile ExecutionStatisticsDynamicBean methodsExecutionStatisticsBean
-
requestExecutionStatisticsBean
private volatile ExecutionStatisticsDynamicBean requestExecutionStatisticsBean
-
resourceMethods
private final java.util.Map<java.lang.String,ResourceMethodMXBeanImpl> resourceMethods
-
resourcePropertyName
private final java.lang.String resourcePropertyName
-
uriResource
private final boolean uriResource
-
mBeanExposer
private final MBeanExposer mBeanExposer
-
-
Constructor Detail
-
ResourceMxBeanImpl
public ResourceMxBeanImpl(ResourceStatistics resourceStatistics, java.lang.String name, boolean uriResource, MBeanExposer mBeanExposer, java.lang.String parentName)
Create and register new MXBean into the mbean server using themBeanExposer
.- Parameters:
resourceStatistics
- resource statistics that should be exposed by this and nested MXBeans.name
- Name of the resource.uriResource
-true
if the resource is identified by URI (and not by java class name for example).mBeanExposer
- MBean exposer.parentName
- Name of the parent bean.
-
-
Method Detail
-
updateResourceStatistics
public void updateResourceStatistics(ResourceStatistics resourceStatistics)
Update the statistics of this MXBean and of nested MXBeans.- Parameters:
resourceStatistics
- New resource statistics.
-
getName
public java.lang.String getName()
Description copied from interface:ResourceMXBean
Get the name of the resource. The name can be URI or resource class name depending on the usage of MXBean.- Specified by:
getName
in interfaceResourceMXBean
- Returns:
- Name of the MXBean.
-
-