Binding v2 runtime - adapters - impl - notifications
[mdsal.git] / binding2 / mdsal-binding2-api / src / main / java / org / opendaylight / mdsal / binding / javav2 / api / NotificationPublishService.java
index eb5d8c2c0926a4bd83ffca97cb4318f2c6b7754f..d6f7c0d808ec15ef4ee3efb51f1af8b10f2da51c 100644 (file)
@@ -12,10 +12,7 @@ import com.google.common.annotations.Beta;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import java.util.concurrent.TimeUnit;
-import org.opendaylight.mdsal.binding.javav2.spec.base.InstanceIdentifier;
-import org.opendaylight.mdsal.binding.javav2.spec.base.KeyedInstanceIdentifier;
 import org.opendaylight.mdsal.binding.javav2.spec.base.Notification;
-import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
 
 /**
  * A {@link NotificationService} which also allows its users to submit YANG-modeled notifications for delivery.
@@ -31,9 +28,6 @@ import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
  * - {@link #offerNotification(org.opendaylight.mdsal.binding.javav2.spec.base.Notification, int, TimeUnit)}, which may
  * block for specified time if resources are thin.
  *
- * <p>
- * Every method has two alternatives for YANG 1.1 notifications tied to container or list node.
- *
  *<p>
  * The actual delivery to listeners is asynchronous and implementation-specific.
  * Users of this interface should not make any assumptions as to whether the
@@ -41,35 +35,16 @@ import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
  */
 
 @Beta
-public interface NotificationPublishService {
+public interface NotificationPublishService extends BindingService {
 
     ListenableFuture<Object> REJECTED = Futures.immediateFailedFuture(
         new NotificationRejectedException("Rejected due to resource constraints."));
 
-    void putNotification(Notification notification) throws InterruptedException;
-
-    ListenableFuture<?> offerNotification(Notification notification);
-
-    ListenableFuture<?> offerNotification(Notification notification, int timeout, TimeUnit unit)
-        throws InterruptedException;
+    void putNotification(Notification<?> notification) throws InterruptedException;
 
+    ListenableFuture<?> offerNotification(Notification<?> notification);
 
-    <T extends TreeNode> void putContainerNotification(Notification notification, InstanceIdentifier<T> ii)
+    ListenableFuture<?> offerNotification(Notification<?> notification, int timeout, TimeUnit unit)
         throws InterruptedException;
 
-    <T extends TreeNode> ListenableFuture<?> offerContainerNotification(Notification notification,
-        InstanceIdentifier<T> ii);
-
-    <T extends TreeNode> ListenableFuture<?> offerContainerNotification(Notification notification, int timeout,
-        TimeUnit unit, InstanceIdentifier<T> ii) throws InterruptedException;
-
-
-    <T extends TreeNode, K> void putListNotification(Notification notification, KeyedInstanceIdentifier<T, K> kii)
-        throws InterruptedException;
-
-    <T extends TreeNode, K> ListenableFuture<?> offerListNotification(Notification notification,
-        KeyedInstanceIdentifier<T, K> kii);
-
-    <T extends TreeNode, K> ListenableFuture<?> offerListNotification(Notification notification, int timeout,
-        TimeUnit unit, KeyedInstanceIdentifier<T, K> kii) throws InterruptedException;
 }