this.executor = executor;\r
}\r
\r
- @Deprecated\r
- override <T extends Notification> addNotificationListener(Class<T> notificationType,\r
- NotificationListener<T> listener) {\r
- listeners.put(notificationType, listener)\r
- }\r
-\r
- @Deprecated\r
- override <T extends Notification> removeNotificationListener(Class<T> notificationType,\r
- NotificationListener<T> listener) {\r
- listeners.remove(notificationType, listener)\r
- }\r
-\r
- override notify(Notification notification) {\r
- publish(notification)\r
- }\r
-\r
def getNotificationTypes(Notification notification) {\r
notification.class.interfaces.filter[it != Notification && Notification.isAssignableFrom(it)]\r
}\r
\r
- @Deprecated\r
- override addNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener listener) {\r
- throw new UnsupportedOperationException("Deprecated method. Use registerNotificationListener instead.");\r
-\r
- }\r
-\r
- @Deprecated\r
- override removeNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener listener) {\r
- throw new UnsupportedOperationException(\r
- "Deprecated method. Use RegisterNotificationListener returned value to close registration.")\r
- }\r
-\r
- @Deprecated\r
- override notify(Notification notification, ExecutorService service) {\r
- publish(notification, service)\r
- }\r
-\r
override publish(Notification notification) {\r
publish(notification, executor)\r
}\r
override publish(Notification notification, ExecutorService service) {\r
val allTypes = notification.notificationTypes\r
\r
- var Iterable<NotificationListener<?>> listenerToNotify = Collections.emptySet();\r
+ var Iterable<NotificationListener<? extends Object>> listenerToNotify = Collections.emptySet();\r
for (type : allTypes) {\r
listenerToNotify = listenerToNotify + listeners.get(type as Class<? extends Notification>)\r
}\r