ONOS-5960 Dynamic Config Svc: Datachange Notifications
Change-Id: I46b999530d985b5f9d2bf611f685c1397353997b
diff --git a/apps/config/src/main/java/org/onosproject/config/DynamicConfigStore.java b/apps/config/src/main/java/org/onosproject/config/DynamicConfigStore.java
index 9ea34f2..25ddf55 100644
--- a/apps/config/src/main/java/org/onosproject/config/DynamicConfigStore.java
+++ b/apps/config/src/main/java/org/onosproject/config/DynamicConfigStore.java
@@ -20,6 +20,7 @@
import org.onosproject.yang.model.ResourceId;
import org.onosproject.store.Store;
+import java.util.Collection;
import java.util.concurrent.CompletableFuture;
/**
@@ -136,4 +137,32 @@
* {@code FailedException} if the delete request failed
*/
CompletableFuture<Boolean> deleteNodeRecursive(ResourceId path);
+
+ /**
+ * Adds a listener to be notified when a leaf or subtree rooted at the
+ * specified path is modified.
+ *
+ * @param path data structure with absolute path to the node being listened to
+ * @param listener listener to be notified
+ * @throws FailedException if the listener could not be added
+ */
+ void addConfigListener(ResourceId path, DynamicConfigListener listener);
+
+ /**
+ * Removes a previously added listener.
+ *
+ * @param path data structure with absolute path to the node being listened to
+ * @param listener listener to unregister
+ * @throws FailedException if the listener could not be removed
+ */
+ void removeConfigListener(ResourceId path, DynamicConfigListener listener);
+
+ /**
+ * Returns a collection of previously added listeners.
+ *
+ * @param path data structure with absolute path to the node being listened to
+ * @return a collection of previously added listeners
+ */
+ Collection<? extends DynamicConfigListener> getConfigListener(ResourceId path);
+ //DynamicConfigListener getConfigListener(ResourceId path);
}
\ No newline at end of file