- void removeRegistrations(final NotificationListenerRegistration<?>... registrations) {
- for (NotificationListenerRegistration<?> reg : registrations) {
- listeners.remove(reg.getType(), reg);
+ private void announceNotificationSubscription(final Class<? extends Notification> notification) {
+ for (final ListenerRegistration<NotificationInterestListener> listener : interestListeners) {
+ try {
+ listener.getInstance().onNotificationSubscribtion(notification);
+ } catch (Exception e) {
+ LOG.warn("Listener {} reported unexpected error on notification {}",
+ listener.getInstance(), notification, e);
+ }