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 = 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;
}
}
@Override
- public ListenableFuture<?> 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;
}
@Override
- public void close() throws Exception {
+ public void close() {
}
final DOMNotificationPublishService domPublish = delegates.getInstance(DOMNotificationPublishService.class);
return new BindingDOMNotificationPublishServiceAdapter(codec, domPublish);
}
-
}
}