org.objectweb.util.monolog.wrapper.javaLog
Class JMXHandler

java.lang.Object
  extended byjava.util.logging.Handler
      extended byorg.objectweb.util.monolog.wrapper.javaLog.JMXHandler
All Implemented Interfaces:
javax.management.NotificationBroadcaster, javax.management.NotificationEmitter

public class JMXHandler
extends java.util.logging.Handler
implements javax.management.NotificationEmitter

The aim of this class is to permit to specify the output for the console handler of the java.util.logging system. This console handler is also able to choose the right ouput (System.err or System.out) depending on the message level.

Author:
S.Chassande-Barrioz

Field Summary
protected  OutputStreamSwitcher oss
           
 
Constructor Summary
JMXHandler()
           
 
Method Summary
 void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
           
 void close()
           
 void flush()
           
 javax.management.MBeanNotificationInfo[] getNotificationInfo()
           
 void publish(java.util.logging.LogRecord record)
           
 void removeNotificationListener(javax.management.NotificationListener listener)
           
 void removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
           
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oss

protected OutputStreamSwitcher oss
Constructor Detail

JMXHandler

public JMXHandler()
Method Detail

addNotificationListener

public void addNotificationListener(javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    java.lang.Object handback)
                             throws java.lang.IllegalArgumentException
Specified by:
addNotificationListener in interface javax.management.NotificationBroadcaster
Throws:
java.lang.IllegalArgumentException

removeNotificationListener

public void removeNotificationListener(javax.management.NotificationListener listener)
                                throws javax.management.ListenerNotFoundException
Specified by:
removeNotificationListener in interface javax.management.NotificationBroadcaster
Throws:
javax.management.ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(javax.management.NotificationListener listener,
                                       javax.management.NotificationFilter filter,
                                       java.lang.Object handback)
                                throws javax.management.ListenerNotFoundException
Specified by:
removeNotificationListener in interface javax.management.NotificationEmitter
Throws:
javax.management.ListenerNotFoundException

getNotificationInfo

public javax.management.MBeanNotificationInfo[] getNotificationInfo()
Specified by:
getNotificationInfo in interface javax.management.NotificationBroadcaster

publish

public void publish(java.util.logging.LogRecord record)

flush

public void flush()

close

public void close()
           throws java.lang.SecurityException
Throws:
java.lang.SecurityException