public class Log4jConfiguratorMBean extends java.lang.Object implements CloneableDynamicMBean
Log4jConfigurator| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ASTERISK
Asterisk used as trailing string for inherited logging levels.
|
static java.lang.String |
DEFAULT_JMX_NAME
Default name.
|
| Constructor and Description |
|---|
Log4jConfiguratorMBean()
Default constructor for Log4jConfiguratorMBean.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a clone of the object.
|
java.lang.Object |
getAttribute(java.lang.String attribute)
Gets the value of an attribute and thus the level of a certain logger.
|
javax.management.AttributeList |
getAttributes(java.lang.String[] attributes)
Gets the values of several attributes.
|
javax.management.MBeanInfo |
getMBeanInfo()
Returns all informations on the MBean, such as attributes and operations.
|
java.lang.Object |
invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
Invokes an operation on the MBean.
|
void |
setAttribute(javax.management.Attribute attribute)
Sets the value of an attribute.
|
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes)
Sets the values of several attributes.
|
java.lang.String |
setLoggerLevel(java.lang.String pattern,
java.lang.String level)
Directly sets a level on one ore more loggers.
|
public static final java.lang.String ASTERISK
public static final java.lang.String DEFAULT_JMX_NAME
public Log4jConfiguratorMBean()
public java.lang.Object getAttribute(java.lang.String attribute)
throws javax.management.AttributeNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException
getAttribute in interface javax.management.DynamicMBeanjavax.management.AttributeNotFoundExceptionjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.getAttribute(String)public void setAttribute(javax.management.Attribute attribute)
throws javax.management.AttributeNotFoundException,
javax.management.InvalidAttributeValueException,
javax.management.MBeanException,
javax.management.ReflectionException
setAttribute in interface javax.management.DynamicMBeanjavax.management.AttributeNotFoundExceptionjavax.management.InvalidAttributeValueExceptionjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.setAttribute(Attribute)public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
getAttribute.getAttributes in interface javax.management.DynamicMBeangetAttribute(String),
DynamicMBean.getAttributes(String[])public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttribute.setAttributes in interface javax.management.DynamicMBeansetAttribute(Attribute),
DynamicMBean.setAttributes(AttributeList)public java.lang.Object invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.MBeanException,
javax.management.ReflectionException
invoke in interface javax.management.DynamicMBeanjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.invoke(String, Object[], String[])public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo in interface javax.management.DynamicMBeangetAttributeInfo(),
getConstructorInfo(),
getOperationInfo(),
getNotificationInfo(),
DynamicMBean.getMBeanInfo()public java.lang.String setLoggerLevel(java.lang.String pattern,
java.lang.String level)
invoke method of this class and has to be public (since it is
called via reflection API).pattern - Regular expression used to select the loggers.level - New level.Level,
invoke(String, Object[], String[]),
getOperationInfo()public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface CloneableDynamicMBeanclone in class java.lang.Objectjava.lang.CloneNotSupportedException