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

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

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

MBean for making non persistent changes to the logging levels on JDK Logging Handlers

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 class name of the Handler, and whose value is the Handler's level.

This MBean defines no operations

This MBean emits no Notifications

Author:
Chris D Arrington

Field Summary
protected static java.util.logging.LogManager manager
           
static java.lang.String OBJECT_NAME_BASE
           
 
Constructor Summary
JDKHandlerMBean()
          Constructor
 
Method Summary
 java.lang.Object getAttribute(java.lang.String attributeName)
           
 javax.management.AttributeList getAttributes(java.lang.String[] attributeNames)
           
protected  java.util.logging.Handler getHandler(java.lang.String handlerName)
          Obtains the Handler instance from the root logger based on the supplied class name
protected  java.util.ArrayList getHandlerNames()
          Returns an ArrayList of all current Handlers' classnames.
 javax.management.MBeanInfo getMBeanInfo()
           
 java.lang.Object invoke(java.lang.String operation, java.lang.Object[] params, java.lang.String[] signature)
           
 void setAttribute(javax.management.Attribute newAttribute)
           
 javax.management.AttributeList setAttributes(javax.management.AttributeList attrs)
           
protected  void setHandlerLevel(java.lang.String handlerName, java.lang.String levelStr)
          Sets the level of a Handler.
 
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

manager

protected static java.util.logging.LogManager manager
Constructor Detail

JDKHandlerMBean

public JDKHandlerMBean()
Constructor

Method Detail

setHandlerLevel

protected void setHandlerLevel(java.lang.String handlerName,
                               java.lang.String levelStr)
                        throws MgmtException,
                               javax.management.InvalidAttributeValueException
Sets the level of a Handler.

Parameters:
handlerName - Class name of the Handler to change
Throws:
MgmtException - No Handler matching the supplied class name, or a null or invalid level was specified
javax.management.InvalidAttributeValueException

getHandlerNames

protected java.util.ArrayList getHandlerNames()
Returns an ArrayList of all current Handlers' classnames.

Returns:
ArrayList of the current Handlers' classnames.

getHandler

protected java.util.logging.Handler getHandler(java.lang.String handlerName)
Obtains the Handler instance from the root logger based on the supplied class name

Parameters:
handlerName - Class name of the Handler
Returns:
Handler from the root logger, or null of none exists

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
Returns:
null because this MBean has no operations defined
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