mx4j.log
Class LoggerBroadcaster
java.lang.Object
|
+--javax.management.NotificationBroadcasterSupport
|
+--mx4j.log.LoggerBroadcaster
- All Implemented Interfaces:
- LoggerBroadcasterMBean, MBeanRegistration, NotificationBroadcaster
- public class LoggerBroadcaster
- extends NotificationBroadcasterSupport
- implements 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.4 $
- Author:
- Simone Bordet
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggerBroadcaster
public LoggerBroadcaster()
preRegister
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws java.lang.Exception
- Specified by:
preRegister in interface MBeanRegistration
postRegister
public void postRegister(java.lang.Boolean registrationDone)
- Specified by:
postRegister in interface MBeanRegistration
preDeregister
public void preDeregister()
throws java.lang.Exception
- Specified by:
preDeregister in interface MBeanRegistration
postDeregister
public void postDeregister()
- Specified by:
postDeregister in interface MBeanRegistration
removeNotificationListener
public void removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
java.lang.Object handback)
throws ListenerNotFoundException
- Specified by:
removeNotificationListener in interface LoggerBroadcasterMBean
sendNotification
public void sendNotification(Notification n)
- Overrides:
sendNotification in class NotificationBroadcasterSupport
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 MBeanNotificationInfo[] getNotificationInfo()
- Overrides:
getNotificationInfo in class NotificationBroadcasterSupport
createLoggerPrototype
protected Logger createLoggerPrototype()