com.ibm.retail.si.mgmt.logging
Class Log4JLoggerMBean

java.lang.Object
  |
  +--com.ibm.retail.si.mgmt.logging.Log4JLoggerMBean
All Implemented Interfaces:
javax.management.DynamicMBean

public class Log4JLoggerMBean
extends java.lang.Object
implements javax.management.DynamicMBean

Dynamic MBean that allows for dynamic, non persistent changes to Log4J Logger logging levels.

The ObjectName of this MBean includes the following attributes, in addition to the SIF attribute of DeviceID:

This management interface has a dynamic list of attributes, each of which is the name of the Logger, and whose value is the Logger's level.

The following operations are included in this management interface. These are described in more detail in the corresponding method documentation.

This MBean emits no Notifications

Author:
Chris D Arrington

Field Summary
static java.lang.String OBJECT_NAME_BASE
           
 
Constructor Summary
Log4JLoggerMBean()
          Constructor
 
Method Summary
 java.lang.Object getAttribute(java.lang.String attributeName)
           
 javax.management.AttributeList getAttributes(java.lang.String[] attributeNames)
           
protected  java.util.ArrayList getLoggerNames()
          Returns an ArrayList of the current logger names.
 javax.management.MBeanInfo getMBeanInfo()
           
 java.lang.Object invoke(java.lang.String operation, java.lang.Object[] params, java.lang.String[] signature)
           
 void resetConfiguration()
          Reload the configuration file for logger properties
 void setAttribute(javax.management.Attribute newAttribute)
           
 javax.management.AttributeList setAttributes(javax.management.AttributeList attrs)
           
protected  void setLoggerLevel(java.lang.String loggerName, java.lang.String levelStr)
          Sets the level of a logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT_NAME_BASE

public static final java.lang.String OBJECT_NAME_BASE
See Also:
Constant Field Values
Constructor Detail

Log4JLoggerMBean

public Log4JLoggerMBean()
Constructor

Method Detail

setLoggerLevel

protected void setLoggerLevel(java.lang.String loggerName,
                              java.lang.String levelStr)
                       throws MgmtException
Sets the level of a logger.

Parameters:
loggerName - Name of logger to set level for
MgmtException

getLoggerNames

protected java.util.ArrayList getLoggerNames()
Returns an ArrayList of the current logger names.

Returns:
ArrayList of the current logger names.

resetConfiguration

public void resetConfiguration()
Reload the configuration file for logger properties


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
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
See Also:
DynamicMBean.getAttribute(java.lang.String)

getAttributes

public javax.management.AttributeList getAttributes(java.lang.String[] attributeNames)
Specified by:
getAttributes in interface javax.management.DynamicMBean
See Also:
DynamicMBean.getAttributes(java.lang.String[])

invoke

public java.lang.Object invoke(java.lang.String operation,
                               java.lang.Object[] params,
                               java.lang.String[] signature)
Specified by:
invoke in interface javax.management.DynamicMBean
See Also:
DynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])

setAttribute

public void setAttribute(javax.management.Attribute newAttribute)
                  throws javax.management.AttributeNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException
Specified by:
setAttribute in interface javax.management.DynamicMBean
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
See Also:
DynamicMBean.setAttribute(javax.management.Attribute)

setAttributes

public javax.management.AttributeList setAttributes(javax.management.AttributeList attrs)
Specified by:
setAttributes in interface javax.management.DynamicMBean
See Also:
DynamicMBean.setAttributes(javax.management.AttributeList)

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo()
Specified by:
getMBeanInfo in interface javax.management.DynamicMBean


Copyright © 2004 IBM. All Rights Reserved.
Generated: July 19 2004