Class ExecutionStatisticsDynamicBean
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.jmx.ExecutionStatisticsDynamicBean
-
- All Implemented Interfaces:
javax.management.DynamicMBean
public class ExecutionStatisticsDynamicBean extends java.lang.Object implements javax.management.DynamicMBeanDynamic MBean that exposes information about execution statistics. The exposed information contains execution statistics for various time window sizes.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,Value<java.lang.Object>>attributeValuesprivate ExecutionStatisticsexecutionStatisticsprivate javax.management.MBeanInfomBeanInfo
-
Constructor Summary
Constructors Constructor Description ExecutionStatisticsDynamicBean(ExecutionStatistics executionStatistics, MBeanExposer mBeanExposer, java.lang.String parentBeanName, java.lang.String beanName)Create a new MXBean and register it into the mbean server usingmBeanExposer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.StringconvertIntervalToString(int interval)java.lang.ObjectgetAttribute(java.lang.String attribute)javax.management.AttributeListgetAttributes(java.lang.String[] attributes)javax.management.MBeanInfogetMBeanInfo()private javax.management.MBeanInfoinitMBeanInfo(ExecutionStatistics initialStatistics)java.lang.Objectinvoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)voidsetAttribute(javax.management.Attribute attribute)javax.management.AttributeListsetAttributes(javax.management.AttributeList attributes)voidupdateExecutionStatistics(ExecutionStatistics executionStatistics)Update the execution statistics that are exposed by this MBean.
-
-
-
Field Detail
-
executionStatistics
private volatile ExecutionStatistics executionStatistics
-
attributeValues
private final java.util.Map<java.lang.String,Value<java.lang.Object>> attributeValues
-
mBeanInfo
private final javax.management.MBeanInfo mBeanInfo
-
-
Constructor Detail
-
ExecutionStatisticsDynamicBean
public ExecutionStatisticsDynamicBean(ExecutionStatistics executionStatistics, MBeanExposer mBeanExposer, java.lang.String parentBeanName, java.lang.String beanName)
Create a new MXBean and register it into the mbean server usingmBeanExposer.- Parameters:
executionStatistics- Execution statistics to be exposed.mBeanExposer- mbean exposer.parentBeanName- Name of the parent mxbean.beanName- A required name of this exposed bean.
-
-
Method Detail
-
initMBeanInfo
private javax.management.MBeanInfo initMBeanInfo(ExecutionStatistics initialStatistics)
-
convertIntervalToString
private java.lang.String convertIntervalToString(int interval)
-
updateExecutionStatistics
public void updateExecutionStatistics(ExecutionStatistics executionStatistics)
Update the execution statistics that are exposed by this MBean.- Parameters:
executionStatistics- New execution statistics.
-
getAttribute
public java.lang.Object getAttribute(java.lang.String attribute) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException- Specified by:
getAttributein interfacejavax.management.DynamicMBean- Throws:
javax.management.AttributeNotFoundExceptionjavax.management.MBeanExceptionjavax.management.ReflectionException
-
setAttribute
public void setAttribute(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException- Specified by:
setAttributein interfacejavax.management.DynamicMBean- Throws:
javax.management.AttributeNotFoundExceptionjavax.management.InvalidAttributeValueExceptionjavax.management.MBeanExceptionjavax.management.ReflectionException
-
getAttributes
public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
- Specified by:
getAttributesin interfacejavax.management.DynamicMBean
-
setAttributes
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
- Specified by:
setAttributesin interfacejavax.management.DynamicMBean
-
invoke
public java.lang.Object invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException, javax.management.ReflectionException- Specified by:
invokein interfacejavax.management.DynamicMBean- Throws:
javax.management.MBeanExceptionjavax.management.ReflectionException
-
getMBeanInfo
public javax.management.MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfoin interfacejavax.management.DynamicMBean
-
-