org.apache.hivemind.management.log4j
Class LoggerMBean
java.lang.Object
org.apache.hivemind.management.mbeans.AbstractDynamicMBean
org.apache.hivemind.management.log4j.LoggerMBean
- All Implemented Interfaces:
- java.util.EventListener, javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.NotificationListener
public class LoggerMBean
- extends AbstractDynamicMBean
- implements javax.management.NotificationListener
MBean for the management of a Log4j logger. Allows to change the level and add appenders. This is
a copy of the LoggerDynamicMBean from the log4 library. The copy was
made to fix an issue with jboss 3.2.7, that don't accept spaces in attribute names. If somebody
feels that such a copy from one apache project to another is not ok, please tell me.
- Author:
- Achim Huegen
|
Constructor Summary |
LoggerMBean(org.apache.log4j.Logger logger)
|
|
Method Summary |
java.lang.Object |
getAttribute(java.lang.String attributeName)
|
protected org.apache.log4j.Logger |
getLogger()
|
javax.management.MBeanInfo |
getMBeanInfo()
|
void |
handleNotification(javax.management.Notification notification,
java.lang.Object handback)
|
java.lang.Object |
invoke(java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
|
void |
postRegister(java.lang.Boolean registrationDone)
|
void |
setAttribute(javax.management.Attribute attribute)
|
| Methods inherited from class org.apache.hivemind.management.mbeans.AbstractDynamicMBean |
createMBeanAttributeInfo, createMBeanConstructorInfo, createMBeanNotificationInfo, createMBeanOperationInfo, getAttributes, getMBeanClassName, getMBeanDescription, getMBeanServer, postDeregister, preDeregister, preRegister, setAttributes, setMBeanInfo |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggerMBean
public LoggerMBean(org.apache.log4j.Logger logger)
handleNotification
public void handleNotification(javax.management.Notification notification,
java.lang.Object handback)
- Specified by:
handleNotification in interface javax.management.NotificationListener
getLogger
protected org.apache.log4j.Logger getLogger()
getMBeanInfo
public javax.management.MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfo in interface javax.management.DynamicMBean- Overrides:
getMBeanInfo in class AbstractDynamicMBean
- See Also:
DynamicMBean.getMBeanInfo()
invoke
public java.lang.Object invoke(java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.MBeanException,
javax.management.ReflectionException
- Specified by:
invoke in interface javax.management.DynamicMBean- Overrides:
invoke in class AbstractDynamicMBean
- Throws:
javax.management.MBeanException
javax.management.ReflectionException- See Also:
DynamicMBean.invoke(java.lang.String, java.lang.Object[],
java.lang.String[])
getAttribute
public java.lang.Object getAttribute(java.lang.String attributeName)
throws javax.management.AttributeNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException
- Specified by:
getAttribute in interface javax.management.DynamicMBean- Overrides:
getAttribute in class AbstractDynamicMBean
- Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException- See Also:
DynamicMBean.getAttribute(java.lang.String)
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 interface javax.management.DynamicMBean- Overrides:
setAttribute in class AbstractDynamicMBean
- Throws:
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException- See Also:
DynamicMBean.setAttribute(javax.management.Attribute)
postRegister
public void postRegister(java.lang.Boolean registrationDone)
- Specified by:
postRegister in interface javax.management.MBeanRegistration- Overrides:
postRegister in class AbstractDynamicMBean