Mechanical code cleanup (sal-dom-api)
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMNotificationPublishService.java
index 8a845e87299fd87c89c553243fa31974b9382454..b4df6b4564b8b78d7f1c8acb262d6ced9a20fee4 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.util.concurrent.ListenableFuture;
 import java.util.concurrent.TimeUnit;
 import javax.annotation.Nonnegative;
 import javax.annotation.Nonnull;
+import org.opendaylight.controller.sal.core.api.BrokerService;
 
 /**
  * A {@link DOMService} which allows its user to send {@link DOMNotification}s. It
@@ -23,12 +24,12 @@ import javax.annotation.Nonnull;
  *   the caller to specify that it should never wait, or put an upper bound on how
  *   long it is going to wait.
  */
-public interface DOMNotificationPublishService extends DOMService {
+public interface DOMNotificationPublishService extends DOMService, BrokerService {
     /**
      * Well-known value indicating that the implementation is currently not
      * able to accept a notification.
      */
-    ListenableFuture<Object> REJECTED = Futures.immediateFailedFuture(new Throwable("Unacceptable blocking conditions encountered"));
+    ListenableFuture<Object> REJECTED = Futures.immediateFailedFuture(new DOMNotificationRejectedException("Unacceptable blocking conditions encountered"));
 
     /**
      * Publish a notification. The result of this method is a {@link ListenableFuture}
@@ -69,7 +70,7 @@ public interface DOMNotificationPublishService extends DOMService {
      * @throws InterruptedException if interrupted while waiting
      * @throws NullPointerException if notification is null.
      */
-    @Nonnull ListenableFuture<? extends Object> putNotification(@Nonnull DOMNotification notification) throws InterruptedException;
+    @Nonnull ListenableFuture<?> putNotification(@Nonnull DOMNotification notification) throws InterruptedException;
 
     /**
      * Attempt to publish a notification. The result of this method is a {@link ListenableFuture}
@@ -86,7 +87,7 @@ public interface DOMNotificationPublishService extends DOMService {
      *         the implementation from accepting the notification for delivery.
      * @throws NullPointerException if notification is null.
      */
-    @Nonnull ListenableFuture<? extends Object> offerNotification(@Nonnull DOMNotification notification);
+    @Nonnull ListenableFuture<?> offerNotification(@Nonnull DOMNotification notification);
 
     /**
      * Attempt to publish a notification. The result of this method is a {@link ListenableFuture}
@@ -107,6 +108,6 @@ public interface DOMNotificationPublishService extends DOMService {
      * @throws NullPointerException if notification or unit is null.
      * @throws IllegalArgumentException if timeout is negative.
      */
-    @Nonnull ListenableFuture<? extends Object> offerNotification(@Nonnull DOMNotification notification,
+    @Nonnull ListenableFuture<?> offerNotification(@Nonnull DOMNotification notification,
         @Nonnegative long timeout, @Nonnull TimeUnit unit) throws InterruptedException;
 }