|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--javax.management.NotificationBroadcasterSupport
|
+--mx4j.log.LoggerBroadcaster
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.
| Nested Class Summary | |
static class |
LoggerBroadcaster.LoggerNotifier
|
| Constructor Summary | |
LoggerBroadcaster()
|
|
| Method Summary | |
protected Logger |
createLoggerPrototype()
|
MBeanNotificationInfo[] |
getNotificationInfo()
Returns the name of the java class of the notification and the notification types sent. |
void |
postDeregister()
Called upon after the MBean has been de-registered. |
void |
postRegister(java.lang.Boolean registrationDone)
Called upon after a registration ( successful or not ). |
void |
preDeregister()
Called upon before an MBean will be de-registered by
the MBeanServer. |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
Allows the MBean to perform any operations before being registered to the MBeanServer.
|
void |
removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
java.lang.Object handback)
|
void |
sendNotification(Notification n)
|
void |
start()
|
void |
start(java.lang.String category)
|
void |
stop()
|
void |
stop(java.lang.String category)
|
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, removeNotificationListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface mx4j.log.LoggerBroadcasterMBean |
addNotificationListener |
| Constructor Detail |
public LoggerBroadcaster()
| Method Detail |
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws java.lang.Exception
MBeanRegistrationMBeanServer.
Any exception will cause the MBean not being registered.
preRegister in interface MBeanRegistrationserver - The MBeanServer on which the MBean will be registered.name - The ObjectName of the MBean.
java.lang.Exception - Exception of the operation. Note that this is caught
by the MBeanServer and re-thrown as an
MBeanRegistrationException.public void postRegister(java.lang.Boolean registrationDone)
MBeanRegistration
postRegister in interface MBeanRegistrationregistrationDone - Evaluates to true of the registrations
is successful, false otherwise.
public void preDeregister()
throws java.lang.Exception
MBeanRegistrationMBean will be de-registered by
the MBeanServer.
preDeregister in interface MBeanRegistrationjava.lang.Exception - Would be caught by the MBeanServer
and rethrown as an MBeanRegistrationException.public void postDeregister()
MBeanRegistration
postDeregister in interface MBeanRegistration
public void removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
java.lang.Object handback)
throws ListenerNotFoundException
removeNotificationListener in interface LoggerBroadcasterMBeanListenerNotFoundExceptionpublic void sendNotification(Notification n)
sendNotification in class NotificationBroadcasterSupportpublic void start()
start in interface LoggerBroadcasterMBeanpublic void start(java.lang.String category)
start in interface LoggerBroadcasterMBeanpublic void stop()
stop in interface LoggerBroadcasterMBeanpublic void stop(java.lang.String category)
stop in interface LoggerBroadcasterMBeanpublic MBeanNotificationInfo[] getNotificationInfo()
NotificationBroadcaster
getNotificationInfo in interface NotificationBroadcastergetNotificationInfo in class NotificationBroadcasterSupportprotected Logger createLoggerPrototype()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||