org.apache.qpid.server.logging.management
Class LoggingManagementMBean

java.lang.Object
  extended by javax.management.StandardMBean
      extended by org.apache.qpid.server.management.DefaultManagedObject
          extended by org.apache.qpid.server.management.AMQManagedObject
              extended by org.apache.qpid.server.logging.management.LoggingManagementMBean
All Implemented Interfaces:
DynamicMBean, MBeanRegistration, NotificationBroadcaster, org.apache.qpid.management.common.mbeans.LoggingManagement, ManagedObject

public class LoggingManagementMBean
extends AMQManagedObject
implements org.apache.qpid.management.common.mbeans.LoggingManagement

MBean class for BrokerLoggingManagerMBean. It implements all the management features exposed for managing logging.


Field Summary
(package private) static CompositeType _loggerLevelCompositeType
           
(package private) static TabularType _loggerLevelTabularType
           
 
Fields inherited from class org.apache.qpid.server.management.AMQManagedObject
_broadcaster, _logActor, _mbeanInfo, _notificationSequenceNumber
 
Fields inherited from interface org.apache.qpid.management.common.mbeans.LoggingManagement
COMPOSITE_ITEM_DESCRIPTIONS, COMPOSITE_ITEM_NAMES, LOGGER_LEVEL, LOGGER_NAME, TABULAR_UNIQUE_INDEX, TYPE
 
Fields inherited from interface org.apache.qpid.server.management.ManagedObject
DOMAIN
 
Constructor Summary
LoggingManagementMBean(String log4jConfigFileName, int log4jLogWatchInterval)
           
 
Method Summary
 String[] getAvailableLoggerLevels()
           
 String getConfigFileRootLoggerLevel()
           
 Integer getLog4jLogWatchInterval()
           
 String getObjectInstanceName()
           
 String getRuntimeRootLoggerLevel()
           
 void reloadConfigFile()
           
static Map<String,String> retrieveConfigFileLoggersLevels(String fileName)
           
static String retrieveConfigFileRootLoggerLevel(String fileName)
           
 boolean setConfigFileLoggerLevel(String logger, String level)
           
 boolean setConfigFileRootLoggerLevel(String level)
           
 boolean setRuntimeLoggerLevel(String logger, String level)
           
 boolean setRuntimeRootLoggerLevel(String level)
           
 TabularData viewConfigFileLoggerLevels()
           
 TabularData viewEffectiveRuntimeLoggerLevels()
           
 
Methods inherited from class org.apache.qpid.server.management.AMQManagedObject
addNotificationListener, getMBeanInfo, getNotificationInfo, removeNotificationListener
 
Methods inherited from class org.apache.qpid.server.management.DefaultManagedObject
getHierarchicalName, getHierarchicalType, getManagedObjectRegistry, getManagementInterface, getObjectName, getObjectNameForSingleInstanceMBean, getParentObject, getType, jmxEncode, register, toString, unregister
 
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_loggerLevelTabularType

static TabularType _loggerLevelTabularType

_loggerLevelCompositeType

static CompositeType _loggerLevelCompositeType
Constructor Detail

LoggingManagementMBean

public LoggingManagementMBean(String log4jConfigFileName,
                              int log4jLogWatchInterval)
                       throws JMException
Throws:
JMException
Method Detail

getObjectInstanceName

public String getObjectInstanceName()
Specified by:
getObjectInstanceName in interface ManagedObject
Returns:
the name that uniquely identifies this object instance. It must be unique only among objects of this type at this level in the hierarchy so the uniqueness should not be too difficult to ensure.

getLog4jLogWatchInterval

public Integer getLog4jLogWatchInterval()
Specified by:
getLog4jLogWatchInterval in interface org.apache.qpid.management.common.mbeans.LoggingManagement

getAvailableLoggerLevels

public String[] getAvailableLoggerLevels()
Specified by:
getAvailableLoggerLevels in interface org.apache.qpid.management.common.mbeans.LoggingManagement

setRuntimeLoggerLevel

public boolean setRuntimeLoggerLevel(String logger,
                                     String level)
Specified by:
setRuntimeLoggerLevel in interface org.apache.qpid.management.common.mbeans.LoggingManagement

viewEffectiveRuntimeLoggerLevels

public TabularData viewEffectiveRuntimeLoggerLevels()
Specified by:
viewEffectiveRuntimeLoggerLevels in interface org.apache.qpid.management.common.mbeans.LoggingManagement

getRuntimeRootLoggerLevel

public String getRuntimeRootLoggerLevel()
Specified by:
getRuntimeRootLoggerLevel in interface org.apache.qpid.management.common.mbeans.LoggingManagement

setRuntimeRootLoggerLevel

public boolean setRuntimeRootLoggerLevel(String level)
Specified by:
setRuntimeRootLoggerLevel in interface org.apache.qpid.management.common.mbeans.LoggingManagement

retrieveConfigFileLoggersLevels

public static Map<String,String> retrieveConfigFileLoggersLevels(String fileName)
                                                          throws IOException
Throws:
IOException

viewConfigFileLoggerLevels

public TabularData viewConfigFileLoggerLevels()
                                       throws IOException
Specified by:
viewConfigFileLoggerLevels in interface org.apache.qpid.management.common.mbeans.LoggingManagement
Throws:
IOException

setConfigFileLoggerLevel

public boolean setConfigFileLoggerLevel(String logger,
                                        String level)
                                 throws IOException
Specified by:
setConfigFileLoggerLevel in interface org.apache.qpid.management.common.mbeans.LoggingManagement
Throws:
IOException

retrieveConfigFileRootLoggerLevel

public static String retrieveConfigFileRootLoggerLevel(String fileName)
                                                throws IOException
Throws:
IOException

getConfigFileRootLoggerLevel

public String getConfigFileRootLoggerLevel()
                                    throws IOException
Specified by:
getConfigFileRootLoggerLevel in interface org.apache.qpid.management.common.mbeans.LoggingManagement
Throws:
IOException

setConfigFileRootLoggerLevel

public boolean setConfigFileRootLoggerLevel(String level)
                                     throws IOException
Specified by:
setConfigFileRootLoggerLevel in interface org.apache.qpid.management.common.mbeans.LoggingManagement
Throws:
IOException

reloadConfigFile

public void reloadConfigFile()
                      throws IOException
Specified by:
reloadConfigFile in interface org.apache.qpid.management.common.mbeans.LoggingManagement
Throws:
IOException


Licensed to the Apache Software Foundation