Deprecate old MD-SAL APIs for removal
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMNotificationService.java
index 036ea24cb16541fe44fc52bd603201b7a5066d5e..a17e4f1cc75c2ee7384301cd1f7f3461f6c9aea6 100644 (file)
@@ -8,16 +8,18 @@
 package org.opendaylight.controller.md.sal.dom.api;
 
 import java.util.Collection;
-import javax.annotation.Nonnull;
-import org.opendaylight.controller.sal.core.api.BrokerService;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 
 /**
  * A {@link DOMService} which allows its users to subscribe to receive
  * {@link DOMNotification}s.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.dom.api.DOMNotificationService} instead
  */
-public interface DOMNotificationService extends DOMService, BrokerService {
+@Deprecated(forRemoval = true)
+public interface DOMNotificationService extends DOMService {
     /**
      * Register a {@link DOMNotificationListener} to receive a set of notifications. As with
      * other ListenerRegistration-based interfaces, registering an instance multiple times
@@ -26,13 +28,14 @@ public interface DOMNotificationService extends DOMService, BrokerService {
      * @param listener Notification instance to register
      * @param types Notification types which should be delivered to the listener. Duplicate
      *              entries are processed only once, null entries are ignored.
-     * @return Registration handle. Invoking {@link DOMNotificationListenerRegistration#close()}
+     * @return Registration handle. Invoking {@link ListenerRegistration#close()}
      *         will stop the delivery of notifications to the listener
      * @throws IllegalArgumentException if types is empty or contains an invalid element, such as
      *         null or a SchemaPath which does not represent a valid {@link DOMNotification} type.
      * @throws NullPointerException if either of the arguments is null
      */
-    <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(@Nonnull T listener, @Nonnull Collection<SchemaPath> types);
+    <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(
+            @NonNull T listener, @NonNull Collection<SchemaPath> types);
 
     /**
      * Register a {@link DOMNotificationListener} to receive a set of notifications. As with
@@ -42,12 +45,13 @@ public interface DOMNotificationService extends DOMService, BrokerService {
      * @param listener Notification instance to register
      * @param types Notification types which should be delivered to the listener. Duplicate
      *              entries are processed only once, null entries are ignored.
-     * @return Registration handle. Invoking {@link DOMNotificationListenerRegistration#close()}
+     * @return Registration handle. Invoking {@link ListenerRegistration#close()}
      *         will stop the delivery of notifications to the listener
      * @throws IllegalArgumentException if types is empty or contains an invalid element, such as
      *         null or a SchemaPath which does not represent a valid {@link DOMNotification} type.
      * @throws NullPointerException if listener is null
      */
     // FIXME: Java 8: provide a default implementation of this method.
-    <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(@Nonnull T listener, SchemaPath... types);
+    <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(
+            @NonNull T listener, SchemaPath... types);
 }