mx4j.log
Class LoggerBroadcaster
java.lang.Object
javax.management.NotificationBroadcasterSupport
mx4j.log.LoggerBroadcaster
- All Implemented Interfaces:
- LoggerBroadcasterMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter
- public class LoggerBroadcaster
- extends javax.management.NotificationBroadcasterSupport
- implements javax.management.MBeanRegistration, LoggerBroadcasterMBean
This broadcaster MBean allows to redirect MX4J internal logging to registered JMX listeners.
Simply register this MBean in the MBeanServer, register one or more listener (eventually with filters
on the notification type), then call (directly or through MBeanServer) one of the start
operations. From this moment, MX4J internal logging is redirected to this MBean, and from here to all registered
listeners, basing on their filters.
- Version:
- $Revision: 1.7 $
Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, handleNotification, removeNotificationListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggerBroadcaster
public LoggerBroadcaster()
preRegister
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
- Specified by:
preRegister
in interface javax.management.MBeanRegistration
- Throws:
java.lang.Exception
postRegister
public void postRegister(java.lang.Boolean registrationDone)
- Specified by:
postRegister
in interface javax.management.MBeanRegistration
preDeregister
public void preDeregister()
throws java.lang.Exception
- Specified by:
preDeregister
in interface javax.management.MBeanRegistration
- Throws:
java.lang.Exception
postDeregister
public void postDeregister()
- Specified by:
postDeregister
in interface javax.management.MBeanRegistration
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 LoggerBroadcasterMBean
- Throws:
javax.management.ListenerNotFoundException
sendNotification
public void sendNotification(javax.management.Notification n)
start
public void start()
- Specified by:
start
in interface LoggerBroadcasterMBean
start
public void start(java.lang.String category)
- Specified by:
start
in interface LoggerBroadcasterMBean
stop
public void stop()
- Specified by:
stop
in interface LoggerBroadcasterMBean
stop
public void stop(java.lang.String category)
- Specified by:
stop
in interface LoggerBroadcasterMBean
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfo
in interface javax.management.NotificationBroadcaster
createLoggerPrototype
protected Logger createLoggerPrototype()
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.