+ notificationBroker = null;
+ invoker.close();
+ }
+}
+
+@Data
+class NotifyTask implements Callable<Object> {
+
+ private static val log = LoggerFactory.getLogger(NotifyTask);
+
+ val NotificationListener listener;
+ val Notification notification;
+
+ override call() {
+ try {
+ listener.onNotification(notification);
+ } catch (Exception e) {
+ log.error("Unhandled exception thrown by listener: {}", listener, e);
+ }
+ return null;