org.glassfish.jersey.server.internal.monitoring.jmx
Class ResourceMethodMXBeanImpl

java.lang.Object
  extended by org.glassfish.jersey.server.internal.monitoring.jmx.ResourceMethodMXBeanImpl
All Implemented Interfaces:
ResourceMethodMXBean

public class ResourceMethodMXBeanImpl
extends Object
implements ResourceMethodMXBean

MXBean implementing the ResourceMethodMXBean MXBean interface.

Author:
Miroslav Fuksa (miroslav.fuksa at oracle.com)

Constructor Summary
ResourceMethodMXBeanImpl(ResourceMethodStatistics methodStatistics, boolean uriResource, MBeanExposer mBeanExposer, String parentName, String methodUniqueId)
          Create a new MXBean and expose it into mbean server using mBeanExposer.
 
Method Summary
 String getConsumesMediaType()
          Get the string with media types consumed by this method, enclosed in double quotas and separated by a comma (e.g.
 String getDeclaringClassName()
          Get the full class name of the class that declares the handling method.
 String getHttpMethod()
          Get the HTTP method of the method.
 String getMethodName()
          Get the name of the Java method.
 String getPath()
          Get the sub resource method path of the method.
 String getProducesMediaType()
          Get the string with media types produced by this method, enclosed in double quotas and separated by a comma (e.g.
 void updateResourceMethodStatistics(ResourceMethodStatistics resourceMethodStatisticsImpl)
          Update the statistics that are exposed by this MXBean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceMethodMXBeanImpl

public ResourceMethodMXBeanImpl(ResourceMethodStatistics methodStatistics,
                                boolean uriResource,
                                MBeanExposer mBeanExposer,
                                String parentName,
                                String methodUniqueId)
Create a new MXBean and expose it into mbean server using mBeanExposer.

Parameters:
methodStatistics - Statistics to be exposed by the MXBean.
uriResource - true if 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 String getPath()
Description copied from interface: ResourceMethodMXBean
Get 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:
getPath in interface ResourceMethodMXBean
Returns:
Sub resource method path or null if the method is not a sub resource method.

getHttpMethod

public String getHttpMethod()
Description copied from interface: ResourceMethodMXBean
Get the HTTP method of the method.

Specified by:
getHttpMethod in interface ResourceMethodMXBean
Returns:
HTTP method (e.g. GET, POST, ...)

getDeclaringClassName

public String getDeclaringClassName()
Description copied from interface: ResourceMethodMXBean
Get the full class name of the class that declares the handling method.

Specified by:
getDeclaringClassName in interface ResourceMethodMXBean
Returns:
Full class name.

getConsumesMediaType

public String getConsumesMediaType()
Description copied from interface: ResourceMethodMXBean
Get 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:
getConsumesMediaType in interface ResourceMethodMXBean
Returns:
Consumed media types.

getProducesMediaType

public String getProducesMediaType()
Description copied from interface: ResourceMethodMXBean
Get 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:
getProducesMediaType in interface ResourceMethodMXBean
Returns:
Produced media types.

getMethodName

public String getMethodName()
Description copied from interface: ResourceMethodMXBean
Get the name of the Java method.

Specified by:
getMethodName in interface ResourceMethodMXBean
Returns:
Name of method.


Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.