org.objectweb.jonas.log
Class LogManagement

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
          extended by org.objectweb.jonas.log.LogManagement
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, LogManagementMBean

public class LogManagement
extends ReconfigEmitter
implements LogManagementMBean

MBean implementation for log management. The managed resource is the monolog LoggerFactory.


Field Summary
static String SERVICE_NAME
          Name as used to label configuration properties.
 
Fields inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
LogManagement()
           
 
Method Summary
 void addNotificationListener(NotificationListener arg0, NotificationFilter arg1, Object arg2)
          Super charge of the methode to take advantage of JMX notification offered by Monolog 2.0
 Map getHandlerAttributes(String handlername)
          Getter for the map of the attributes of a handler.
 String[] getHandlerNames()
          Returns the names of the Monolog handlers
static LogManagement getInstance()
           
 Properties getProperties()
           
 String getTopicLevel(String topic)
          Return a topic's level
 String[] getTopics()
          Assumes that all Loggers are TopicalLogger.
 void saveConfig()
          Save updated configuration.
 void setTopicLevel(String topic, String level)
          set Topic Level
 
Methods inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
initLogger, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
getNotificationInfo, handleNotification, removeNotificationListener, 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 String SERVICE_NAME
Name as used to label configuration properties.

See Also:
Constant Field Values
Constructor Detail

LogManagement

public LogManagement()
Method Detail

getInstance

public static LogManagement getInstance()
Returns:
Returns the LogManagement unique instance.

getTopics

public String[] getTopics()
Description copied from interface: LogManagementMBean
Assumes that all Loggers are TopicalLogger.

Specified by:
getTopics in interface LogManagementMBean
Returns:
the topics list. Assumes that all Loggers are TopicalLoggers.

getTopicLevel

public String getTopicLevel(String topic)
Return a topic's level

Specified by:
getTopicLevel in interface LogManagementMBean
Parameters:
topic - the topic we need ti know its level
Returns:
the topic's level

setTopicLevel

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

Specified by:
setTopicLevel in interface LogManagementMBean
Parameters:
topic - topic to set
level - the level to set

getProperties

public Properties getProperties()
Specified by:
getProperties in interface LogManagementMBean
Returns:
list of properties for logging system

saveConfig

public void saveConfig()
Save updated configuration.

Specified by:
saveConfig in interface LogManagementMBean

getHandlerNames

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

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

getHandlerAttributes

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

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

addNotificationListener

public void addNotificationListener(NotificationListener arg0,
                                    NotificationFilter arg1,
                                    Object arg2)
Super charge of the methode to take advantage of JMX notification offered by Monolog 2.0

Specified by:
addNotificationListener in interface NotificationBroadcaster
Overrides:
addNotificationListener in class NotificationBroadcasterSupport
Parameters:
arg0 - The notification Listener
arg1 - The notification Filter
arg2 - Handback object


Copyright © 2007 OW2 Consortium. All Rights Reserved.