Move createProxy()
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / impl / BindingDOMNotificationPublishServiceAdapter.java
index 1fe81ea3f497d6511293582e19feb237cb10bad4..b3c8233fd36938f8b3a8198d31b0d92d7a4d7ef4 100644 (file)
@@ -19,21 +19,16 @@ import org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService;
 import org.opendaylight.controller.md.sal.dom.api.DOMService;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
+@Deprecated
 public class BindingDOMNotificationPublishServiceAdapter implements NotificationPublishService, AutoCloseable {
 
-    static final Factory<NotificationPublishService> BUILDER_FACTORY = new BindingDOMAdapterBuilder.Factory<NotificationPublishService>() {
-
-        @Override
-        public BindingDOMAdapterBuilder<NotificationPublishService> newBuilder() {
-            return new Builder();
-        }
-
-    };
+    static final Factory<NotificationPublishService> BUILDER_FACTORY = Builder::new;
 
     private final BindingToNormalizedNodeCodec codecRegistry;
     private final DOMNotificationPublishService domPublishService;
 
-    public BindingDOMNotificationPublishServiceAdapter(final BindingToNormalizedNodeCodec codec, final DOMNotificationPublishService domPublishService) {
+    public BindingDOMNotificationPublishServiceAdapter(final BindingToNormalizedNodeCodec codec,
+            final DOMNotificationPublishService domPublishService) {
         this.codecRegistry = codec;
         this.domPublishService = domPublishService;
     }
@@ -52,7 +47,7 @@ public class BindingDOMNotificationPublishServiceAdapter implements Notification
     }
 
     @Override
-    public ListenableFuture<? extends Object> offerNotification(final Notification notification) {
+    public ListenableFuture<?> offerNotification(final Notification notification) {
         ListenableFuture<?> offerResult = domPublishService.offerNotification(toDomNotification(notification));
         return DOMNotificationPublishService.REJECTED.equals(offerResult)
                 ? NotificationPublishService.REJECTED
@@ -60,8 +55,10 @@ public class BindingDOMNotificationPublishServiceAdapter implements Notification
     }
 
     @Override
-    public ListenableFuture<? extends Object> offerNotification(final Notification notification, final int timeout, final TimeUnit unit) throws InterruptedException {
-        ListenableFuture<?> offerResult = domPublishService.offerNotification(toDomNotification(notification), timeout, unit);
+    public ListenableFuture<?> offerNotification(final Notification notification, final int timeout,
+            final TimeUnit unit) throws InterruptedException {
+        ListenableFuture<?> offerResult = domPublishService.offerNotification(toDomNotification(notification),
+                timeout, unit);
         return DOMNotificationPublishService.REJECTED.equals(offerResult)
                 ? NotificationPublishService.REJECTED
                 : offerResult;
@@ -72,7 +69,7 @@ public class BindingDOMNotificationPublishServiceAdapter implements Notification
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
 
     }
 
@@ -89,6 +86,5 @@ public class BindingDOMNotificationPublishServiceAdapter implements Notification
             final DOMNotificationPublishService domPublish = delegates.getInstance(DOMNotificationPublishService.class);
             return new BindingDOMNotificationPublishServiceAdapter(codec, domPublish);
         }
-
     }
 }