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.DynamicMBean
Dynamic 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>>
attributeValues
private ExecutionStatistics
executionStatistics
private javax.management.MBeanInfo
mBeanInfo
-
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.String
convertIntervalToString(int interval)
java.lang.Object
getAttribute(java.lang.String attribute)
javax.management.AttributeList
getAttributes(java.lang.String[] attributes)
javax.management.MBeanInfo
getMBeanInfo()
private javax.management.MBeanInfo
initMBeanInfo(ExecutionStatistics initialStatistics)
java.lang.Object
invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
void
setAttribute(javax.management.Attribute attribute)
javax.management.AttributeList
setAttributes(javax.management.AttributeList attributes)
void
updateExecutionStatistics(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:
getAttribute
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.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:
setAttribute
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
-
getAttributes
public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
- Specified by:
getAttributes
in interfacejavax.management.DynamicMBean
-
setAttributes
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
- Specified by:
setAttributes
in 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:
invoke
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.MBeanException
javax.management.ReflectionException
-
getMBeanInfo
public javax.management.MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfo
in interfacejavax.management.DynamicMBean
-
-