From: Robert Varga Date: Mon, 8 Dec 2014 13:17:43 +0000 (+0100) Subject: BUG-2288: deprecate old binding Notification API elements X-Git-Tag: release/beryllium~627^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=1cb51ab4a9b3858e72bdf2531113215cc72a46b2 BUG-2288: deprecate old binding Notification API elements Adds deprecation markings to the current API, guiding users to the new API instead. Change-Id: I8c384a4267a0c0fad0e0f2eccbeaaf9bfc83bfdc Signed-off-by: Robert Varga --- diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java index be8e0cefc1..e5a0a2bd6d 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationListener.java @@ -8,7 +8,6 @@ package org.opendaylight.controller.sal.binding.api; import java.util.EventListener; - import org.opendaylight.yangtools.yang.binding.Notification; /** @@ -17,7 +16,9 @@ import org.opendaylight.yangtools.yang.binding.Notification; * capture of this interface. * * @param the interested notification type + * @deprecated Deprecated unused API. */ +@Deprecated public interface NotificationListener extends EventListener { /** * Invoked to deliver a notification. diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java index 00db80c19f..4b06e77c44 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java @@ -9,7 +9,6 @@ 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.yang.binding.Notification; @@ -18,7 +17,10 @@ import org.opendaylight.yangtools.yang.binding.Notification; * Interface for a notification service that provides publish/subscribe capabilities for YANG * modeled notifications. This interface is a combination of the {@link NotificationService} and * {@link NotificationPublishService} interfaces. + * + * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.NotificationPublishService}. */ +@Deprecated public interface NotificationProviderService extends NotificationService, NotificationPublishService { /** diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java index 335f55bcbb..dd66aa67f8 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationService.java @@ -91,7 +91,10 @@ import org.opendaylight.yangtools.yang.binding.Notification; * * The onStart method will be invoked when someone publishes a Start notification and * the onStop method will be invoked when someone publishes a Stop notification. + * + * @deprecated Please use {@link org.opendaylight.controller.md.sal.binding.api.NotificationService} instead. */ +@Deprecated public interface NotificationService extends BindingAwareService { /** * Registers a generic listener implementation for a specified notification type.