|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
mx4j.log.LoggerBroadcaster
public class 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()
|
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
Returns the metadata information associated with this emitter. |
void |
postDeregister()
Callback called just after the MBean has been successfully unregistered. |
void |
postRegister(java.lang.Boolean registrationDone)
Callback called just after the MBean has been registered (successfully or not). |
void |
preDeregister()
Callback called just before MBean unregistration from the MBeanServer. |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
Callback called just before MBean registration in the MBeanServer. |
void |
removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
Removes a notification listener from this MBean. |
void |
sendNotification(javax.management.Notification n)
Sends the given notification to all registered listeners |
void |
start()
|
void |
start(java.lang.String category)
|
void |
stop()
|
void |
stop(java.lang.String category)
|
| 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 |
| Methods inherited from interface mx4j.log.LoggerBroadcasterMBean |
|---|
addNotificationListener |
| Constructor Detail |
|---|
public LoggerBroadcaster()
| Method Detail |
|---|
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
javax.management.MBeanRegistration
preRegister in interface javax.management.MBeanRegistrationserver - The MBeanServer on which the MBean will be registered.name - The ObjectName of the MBean.
ObjectName of the registered MBean, must not be null
java.lang.Exception - Any possible exception generated by this method will be caught
by the MBeanServer and re-thrown as an MBeanRegistrationException
to the client.public void postRegister(java.lang.Boolean registrationDone)
javax.management.MBeanRegistration
postRegister in interface javax.management.MBeanRegistrationregistrationDone - True if the registration was successful, false otherwise.
public void preDeregister()
throws java.lang.Exception
javax.management.MBeanRegistration
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exception - Any possible exception generated by this method will be caught
by the MBeanServer and re-thrown as an MBeanRegistrationException
to the client.public void postDeregister()
javax.management.MBeanRegistration
postDeregister in interface javax.management.MBeanRegistration
public void removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws javax.management.ListenerNotFoundException
javax.management.NotificationEmitter
removeNotificationListener in interface javax.management.NotificationEmitterremoveNotificationListener in interface LoggerBroadcasterMBeanremoveNotificationListener in class javax.management.NotificationBroadcasterSupportlistener - The listener that was previously added to this MBean.filter - The filter that was specified when the listener was added.handback - The handback that was specified when the listener was added.
javax.management.ListenerNotFoundException - If the triple listener, filter, handback is not registered with the emitterpublic void sendNotification(javax.management.Notification n)
javax.management.NotificationBroadcasterSupport
sendNotification in class javax.management.NotificationBroadcasterSupportn - The notification to sendpublic 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 javax.management.MBeanNotificationInfo[] getNotificationInfo()
javax.management.NotificationBroadcaster
getNotificationInfo in interface javax.management.NotificationBroadcastergetNotificationInfo in class javax.management.NotificationBroadcasterSupportprotected Logger createLoggerPrototype()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||