Log4j 1.2.16

org.apache.log4j.jmx
Class AbstractDynamicMBean

java.lang.Object
  extended by 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


Constructor Summary
AbstractDynamicMBean()
           
 
Method Summary
protected static String getAppenderName(Appender appender)
          Get MBean name.
 AttributeList getAttributes(String[] attributeNames)
          Enables the to get the values of several attributes of the Dynamic MBean.
protected abstract  Logger getLogger()
           
 void postDeregister()
           
 void postRegister(Boolean registrationDone)
           
 void preDeregister()
          Performs cleanup for deregistering this MBean.
 ObjectName preRegister(MBeanServer server, ObjectName name)
           
protected  void registerMBean(Object mbean, ObjectName objectName)
          Registers MBean instance in the attached server.
 AttributeList 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getMBeanInfo, invoke, setAttribute
 

Constructor Detail

AbstractDynamicMBean

public AbstractDynamicMBean()
Method Detail

getAppenderName

protected static String getAppenderName(Appender appender)
Get MBean name.

Parameters:
appender - appender, may not be null.
Returns:
name.
Since:
1.2.16

getAttributes

public AttributeList getAttributes(String[] attributeNames)
Enables the to get the values of several attributes of the Dynamic MBean.

Specified by:
getAttributes in interface DynamicMBean

setAttributes

public AttributeList setAttributes(AttributeList attributes)
Sets the values of several attributes of the Dynamic MBean, and returns the list of attributes that have been set.

Specified by:
setAttributes in interface DynamicMBean

getLogger

protected abstract Logger getLogger()

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface MBeanRegistration

postRegister

public void postRegister(Boolean registrationDone)
Specified by:
postRegister in interface MBeanRegistration

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
Specified by:
preRegister in interface MBeanRegistration

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.

Throws:
InstanceAlreadyExistsException
MBeanRegistrationException
NotCompliantMBeanException

preDeregister

public void preDeregister()
Performs cleanup for deregistering this MBean. Default implementation unregisters MBean instances which are registered using registerMBean(Object mbean, ObjectName objectName).

Specified by:
preDeregister in interface MBeanRegistration

Log4j 1.2.16

Copyright 2000-2007 Apache Software Foundation.