public class StatisticsMBean extends AbstractMarkerBean
ManagementFactory.getPlatformMBeanServer().createMBean(
StatisticsMBean.class.getName(),
new ObjectName("ch.qos.logback.classic:name=Statistics"));
Note that the object names for this bean can be whatever you want. For the
example I picked a name that will ensure that the statistics are grouped
with the Logback configuration beans.myName, myServer| Constructor and Description |
|---|
StatisticsMBean() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
onDeregister(MBeanServer server,
ObjectName beanName) |
protected void |
onRegister(MBeanServer server,
ObjectName beanName) |
getAttribute, getAttributes, getMBeanInfo, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributesprotected void onRegister(MBeanServer server, ObjectName beanName)
onRegister in class AbstractMarkerBeanprotected void onDeregister(MBeanServer server, ObjectName beanName)
onDeregister in class AbstractMarkerBeanCopyright © 2022. All rights reserved.