+ for (NotificationListenerRegistration<?> r : toNotify) {
+ service.submit(new NotifyTask(r, notification));
+ }
+ }
+
+ private void addRegistrations(final NotificationListenerRegistration<?>... registrations) {
+ for (NotificationListenerRegistration<?> reg : registrations) {
+ listeners.put(reg.getType(), reg);
+ this.announceNotificationSubscription(reg.getType());
+ }
+ }
+
+ void removeRegistrations(final NotificationListenerRegistration<?>... registrations) {
+ for (NotificationListenerRegistration<?> reg : registrations) {
+ listeners.remove(reg.getType(), reg);