Merge "Fixed whitespace dependent tests in config-persister-directory-adapter"
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / NotificationProviderService.java
index 64aab6ec0c76c782de761fd1413f02d0e84d15f1..b94695b83d437e31194e1e862da479b787ba8d80 100644 (file)
@@ -7,31 +7,36 @@
  */
 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.Registration;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
 public interface NotificationProviderService extends NotificationService, NotificationPublishService<Notification> {
-
-    @Deprecated
-    void notify(Notification 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);
-    
-    @Override
-    public <T extends Notification> Registration<NotificationListener<T>> registerNotificationListener(
-            Class<T> notificationType, NotificationListener<T> listener);
-    
-    @Override
-    public Registration<org.opendaylight.yangtools.yang.binding.NotificationListener> registerNotificationListener(
-            org.opendaylight.yangtools.yang.binding.NotificationListener listener);
+
+    ListenerRegistration<NotificationInterestListener> registerInterestListener(
+            NotificationInterestListener interestListener);
+
+    public interface NotificationInterestListener extends EventListener {
+
+        void onNotificationSubscribtion(Class<? extends Notification> notificationType);
+    }
 }