Class ResourceMethodMXBeanImpl
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.jmx.ResourceMethodMXBeanImpl
-
- All Implemented Interfaces:
ResourceMethodMXBean
public class ResourceMethodMXBeanImpl extends java.lang.Object implements ResourceMethodMXBean
MXBean implementing theResourceMethodMXBeanMXBean interface.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringmethodBeanNameprivate ExecutionStatisticsDynamicBeanmethodExecutionStatisticsMxBeanprivate java.lang.Stringnameprivate java.lang.Stringpathprivate ExecutionStatisticsDynamicBeanrequestExecutionStatisticsMxBeanprivate ResourceMethodresourceMethod
-
Constructor Summary
Constructors Constructor Description ResourceMethodMXBeanImpl(ResourceMethodStatistics methodStatistics, boolean uriResource, MBeanExposer mBeanExposer, java.lang.String parentName, java.lang.String methodUniqueId)Create a new MXBean and expose it into mbean server usingmBeanExposer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetConsumesMediaType()Get the string with media types consumed by this method, enclosed in double quotas and separated by a comma (e.g.java.lang.StringgetDeclaringClassName()Get the full class name of the class that declares the handling method.java.lang.StringgetHttpMethod()Get the HTTP method of the method.java.lang.StringgetMethodName()Get the name of the Java method.java.lang.StringgetPath()Get the sub resource method path of the method.java.lang.StringgetProducesMediaType()Get the string with media types produced by this method, enclosed in double quotas and separated by a comma (e.g.voidupdateResourceMethodStatistics(ResourceMethodStatistics resourceMethodStatisticsImpl)Update the statistics that are exposed by this MXBean.
-
-
-
Field Detail
-
methodExecutionStatisticsMxBean
private volatile ExecutionStatisticsDynamicBean methodExecutionStatisticsMxBean
-
requestExecutionStatisticsMxBean
private volatile ExecutionStatisticsDynamicBean requestExecutionStatisticsMxBean
-
path
private final java.lang.String path
-
name
private final java.lang.String name
-
resourceMethod
private final ResourceMethod resourceMethod
-
methodBeanName
private final java.lang.String methodBeanName
-
-
Constructor Detail
-
ResourceMethodMXBeanImpl
public ResourceMethodMXBeanImpl(ResourceMethodStatistics methodStatistics, boolean uriResource, MBeanExposer mBeanExposer, java.lang.String parentName, java.lang.String methodUniqueId)
Create a new MXBean and expose it into mbean server usingmBeanExposer.- Parameters:
methodStatistics- Statistics to be exposed by the MXBean.uriResource-trueif the enclosing resource is identified by URI (and not by java class name for example).mBeanExposer- MBean exposer.parentName- Name of the parent bean.methodUniqueId- method unique identifier in the enclosing resource
-
-
Method Detail
-
updateResourceMethodStatistics
public void updateResourceMethodStatistics(ResourceMethodStatistics resourceMethodStatisticsImpl)
Update the statistics that are exposed by this MXBean.- Parameters:
resourceMethodStatisticsImpl- New statistics.
-
getPath
public java.lang.String getPath()
Description copied from interface:ResourceMethodMXBeanGet the sub resource method path of the method. This field is non-null only for sub resource methods and contains path relative to resource in which the method is defined.- Specified by:
getPathin interfaceResourceMethodMXBean- Returns:
- Sub resource method path or null if the method is not a sub resource method.
-
getHttpMethod
public java.lang.String getHttpMethod()
Description copied from interface:ResourceMethodMXBeanGet the HTTP method of the method.- Specified by:
getHttpMethodin interfaceResourceMethodMXBean- Returns:
- HTTP method (e.g. GET, POST, ...)
-
getDeclaringClassName
public java.lang.String getDeclaringClassName()
Description copied from interface:ResourceMethodMXBeanGet the full class name of the class that declares the handling method.- Specified by:
getDeclaringClassNamein interfaceResourceMethodMXBean- Returns:
- Full class name.
-
getConsumesMediaType
public java.lang.String getConsumesMediaType()
Description copied from interface:ResourceMethodMXBeanGet the string with media types consumed by this method, enclosed in double quotas and separated by a comma (e.g. "text/plain","text/html").- Specified by:
getConsumesMediaTypein interfaceResourceMethodMXBean- Returns:
- Consumed media types.
-
getProducesMediaType
public java.lang.String getProducesMediaType()
Description copied from interface:ResourceMethodMXBeanGet the string with media types produced by this method, enclosed in double quotas and separated by a comma (e.g. "text/plain","text/html").- Specified by:
getProducesMediaTypein interfaceResourceMethodMXBean- Returns:
- Produced media types.
-
getMethodName
public java.lang.String getMethodName()
Description copied from interface:ResourceMethodMXBeanGet the name of the Java method.- Specified by:
getMethodNamein interfaceResourceMethodMXBean- Returns:
- Name of method.
-
-