| Method from org.jboss.mx.util.JBossNotificationBroadcasterSupport Detail: |
public void addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback) {
try
{
registry.add(listener, filter, handback);
}
catch (JMException e)
{
// This shouldn't happen?
throw new RuntimeException(e.toString());
}
}
|
public MBeanNotificationInfo[] getNotificationInfo() {
return NO_NOTIFICATIONS;
}
|
public void handleNotification(NotificationListener listener,
Notification notification,
Object handback) {
try
{
listener.handleNotification(notification, handback);
}
catch (Throwable ignored)
{
log.debug("Ignored unhandled throwable from listener", ignored);
}
}
Handle the notification, the default implementation is to synchronously invoke the listener. |
public long nextNotificationSequenceNumber() {
return sequenceNumber.increment();
}
The nextNotificationSequenceNumber method returns
the next sequence number for use in notifications. |
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException {
registry.remove(listener);
}
|
public void removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback) throws ListenerNotFoundException {
registry.remove(listener, filter, handback);
}
|
public void sendNotification(Notification notification) {
ListenerRegistry.ListenerRegistrationIterator iterator = registry.iterator();
while (iterator.hasNext())
{
ListenerRegistration registration = iterator.nextRegistration();
NotificationFilter filter = registration.getFilter();
if (filter == null)
handleNotification(registration.getListener(), notification, registration.getHandback());
else if (filter.isNotificationEnabled(notification))
handleNotification(registration.getListener(), notification, registration.getHandback());
}
}
|