Fix of issue 377 for Notifications resolving.
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / NotificationProviderService.java
index cb201c5fd16bd8800d83a4cdd286a619430c31eb..c28b03eb65a092817917956cc9794a8267c41479 100644 (file)
@@ -7,14 +7,17 @@
  */
 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.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
 public interface NotificationProviderService extends NotificationService, NotificationPublishService<Notification> {
 
+
     /**
      * Deprecated. Use {@link #publish(Notification)}.
      * 
@@ -34,7 +37,8 @@ public interface NotificationProviderService extends NotificationService, Notifi
     /**
      * Publishes a notification.
      * 
-     * @param Notification notification to publish.
+     * @param Notification
+     *            notification to publish.
      * 
      */
     @Override
@@ -46,4 +50,12 @@ public interface NotificationProviderService extends NotificationService, Notifi
      */
     @Override
     void publish(Notification notification, ExecutorService service);
+
+    ListenerRegistration<NotificationInterestListener> registerInterestListener(
+            NotificationInterestListener interestListener);
+
+    public interface NotificationInterestListener extends EventListener {
+
+        void onNotificationSubscribtion(Class<? extends Notification> notificationType);
+    }
 }