Class AbstractDynamicMBean
java.lang.Object
org.apache.log4j.jmx.AbstractDynamicMBean
- All Implemented Interfaces:
DynamicMBean, MBeanRegistration
- Direct Known Subclasses:
AppenderDynamicMBean, HierarchyDynamicMBean, LayoutDynamicMBean, LoggerDynamicMBean
public abstract class AbstractDynamicMBean
extends Object
implements DynamicMBean, MBeanRegistration
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Stringprivate final Vector(package private) MBeanServer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringgetAppenderName(Appender appender) Get MBean name.getAttributes(String[] attributeNames) Enables the to get the values of several attributes of the Dynamic MBean.protected abstract LoggervoidvoidpostRegister(Boolean registrationDone) voidPerforms cleanup for deregistering this MBean.preRegister(MBeanServer server, ObjectName name) protected voidregisterMBean(Object mbean, ObjectName objectName) Registers MBean instance in the attached server.setAttributes(AttributeList attributes) Sets the values of several attributes of the Dynamic MBean, and returns the list of attributes that have been set.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DynamicMBean
getAttribute, getMBeanInfo, invoke, setAttribute
-
Field Details
-
dClassName
String dClassName -
server
MBeanServer server -
mbeanList
-
-
Constructor Details
-
AbstractDynamicMBean
public AbstractDynamicMBean()
-
-
Method Details
-
getAppenderName
-
getAttributes
Enables the to get the values of several attributes of the Dynamic MBean.- Specified by:
getAttributesin interfaceDynamicMBean
-
getLogger
-
postDeregister
public void postDeregister()- Specified by:
postDeregisterin interfaceMBeanRegistration
-
postRegister
- Specified by:
postRegisterin interfaceMBeanRegistration
-
preDeregister
public void preDeregister()Performs cleanup for deregistering this MBean. Default implementation unregisters MBean instances which are registered usingregisterMBean(Object mbean, ObjectName objectName).- Specified by:
preDeregisterin interfaceMBeanRegistration
-
preRegister
- Specified by:
preRegisterin interfaceMBeanRegistration
-
registerMBean
protected void registerMBean(Object mbean, ObjectName objectName) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException Registers MBean instance in the attached server. Must NOT be called before registration of this instance. -
setAttributes
Sets the values of several attributes of the Dynamic MBean, and returns the list of attributes that have been set.- Specified by:
setAttributesin interfaceDynamicMBean
-