Merge "Fix typo in match types yang model"
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / NotificationProviderService.java
index 86c9eebecd0b9b17b78c957e7ef30ecead94a0a5..08029dc52fa2c35fe1ea0f4b7994ef6eecf3fbe2 100644 (file)
@@ -7,9 +7,54 @@
  */
 package org.opendaylight.controller.sal.binding.api;
 
+import java.util.EventListener;
+import java.util.concurrent.ExecutorService;
+
+import org.opendaylight.controller.md.sal.common.api.notify.NotificationPublishService;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
-public interface NotificationProviderService extends NotificationService {
+public interface NotificationProviderService extends NotificationService, NotificationPublishService<Notification> {
+
 
+    /**
+     * Deprecated. Use {@link #publish(Notification)}.
+     *
+     * @param notification
+     */
+    @Deprecated
     void notify(Notification notification);
+
+    /**
+     * Deprecated. Use {@link #publish(Notification,ExecutorService)}.
+     *
+     * @param notification
+     */
+    @Deprecated
+    void notify(Notification notification, ExecutorService service);
+
+    /**
+     * Publishes a notification.
+     *
+     * @param Notification
+     *            notification to publish.
+     *
+     */
+    @Override
+    void publish(Notification notification);
+
+    /**
+     * Publishes a notification, listener calls are done in provided executor.
+     *
+     */
+    @Override
+    void publish(Notification notification, ExecutorService service);
+
+    ListenerRegistration<NotificationInterestListener> registerInterestListener(
+            NotificationInterestListener interestListener);
+
+    public interface NotificationInterestListener extends EventListener {
+
+        void onNotificationSubscribtion(Class<? extends Notification> notificationType);
+    }
 }