org.objectweb.jonas.common
Class LogManagement

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.objectweb.jonas.management.ReconfigDispatcher
          extended by org.objectweb.jonas.common.LogManagement
All Implemented Interfaces:
javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, LogManagementMBean, ReconfigDispatcherMBean

public class LogManagement
extends ReconfigDispatcher
implements LogManagementMBean


Field Summary
static java.lang.String SERVICE_NAME
           
 
Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
LogManagement()
           
 
Method Summary
 void addNotificationListener(javax.management.NotificationListener arg0, javax.management.NotificationFilter arg1, java.lang.Object arg2)
          Super charge of the methode to take advantage of JMX notification offered by Monolog 2.0
 java.util.Map getHandlerAttributes(java.lang.String handlername)
          Getter for the map of the attributes of a handler
 java.lang.String[] getHandlerNames()
          Returns the names of the Monolog handlers
static LogManagement getInstance()
           
 java.util.Properties getProperties()
          returns list of properties for logging system
 java.lang.String getTopicLevel(java.lang.String topic)
          get Topic Level
 java.lang.String[] getTopics()
          get Topics.
 void saveConfig()
           
 void setTopicLevel(java.lang.String topic, java.lang.String level)
          set Topic Level
 
Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher
getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
handleNotification, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

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

LogManagement

public LogManagement()
Method Detail

getInstance

public static LogManagement getInstance()

getTopics

public java.lang.String[] getTopics()
get Topics. Assumes that all Loggers are TopicalLoggers.

Specified by:
getTopics in interface LogManagementMBean

getTopicLevel

public java.lang.String getTopicLevel(java.lang.String topic)
get Topic Level

Specified by:
getTopicLevel in interface LogManagementMBean

setTopicLevel

public void setTopicLevel(java.lang.String topic,
                          java.lang.String level)
set Topic Level

Specified by:
setTopicLevel in interface LogManagementMBean

getProperties

public java.util.Properties getProperties()
returns list of properties for logging system

Specified by:
getProperties in interface LogManagementMBean

saveConfig

public void saveConfig()
Specified by:
saveConfig in interface LogManagementMBean

getHandlerNames

public java.lang.String[] getHandlerNames()
Returns the names of the Monolog handlers

Specified by:
getHandlerNames in interface LogManagementMBean
Returns:
The handler names defines in Monolog

getHandlerAttributes

public java.util.Map getHandlerAttributes(java.lang.String handlername)
Getter for the map of the attributes of a handler

Specified by:
getHandlerAttributes in interface LogManagementMBean
Returns:
The map of the attributes defines for the handler

addNotificationListener

public void addNotificationListener(javax.management.NotificationListener arg0,
                                    javax.management.NotificationFilter arg1,
                                    java.lang.Object arg2)
                             throws java.lang.IllegalArgumentException
Super charge of the methode to take advantage of JMX notification offered by Monolog 2.0

Specified by:
addNotificationListener in interface javax.management.NotificationBroadcaster
Overrides:
addNotificationListener in class ReconfigDispatcher
Parameters:
arg0 - The notification Listener
arg1 - The notification Filter
arg2 - Handback object
Throws:
java.lang.IllegalArgumentException