X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fapi%2FDOMDataTreeChangeService.java;h=46a6fb2cb7ccf6bf140689ce6ed10ecf715df1bd;hb=e1ede0942d3bff1f1b150816e6bfa96ed9366c20;hp=e001dbbf1bcac5b68ef80f9286810e1a2d295597;hpb=10d39810f724474b84d0e6d3f5676a5154593ca2;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMDataTreeChangeService.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMDataTreeChangeService.java index e001dbbf1b..46a6fb2cb7 100644 --- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMDataTreeChangeService.java +++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMDataTreeChangeService.java @@ -11,22 +11,24 @@ import javax.annotation.Nonnull; import org.opendaylight.yangtools.concepts.ListenerRegistration; /** - * A {@link DOMService} which allows users to register for changes to a + * A {@link DOMServiceExtension} which allows users to register for changes to a * subtree. */ -public interface DOMDataTreeChangeService extends DOMService { +public interface DOMDataTreeChangeService extends DOMDataBrokerExtension { /** * Registers a {@link DOMDataTreeChangeListener} to receive * notifications when data changes under a given path in the conceptual data * tree. + * *

* You are able to register for notifications for any node or subtree * which can be represented using {@link DOMDataTreeIdentifier}. - *

* + *

* You are able to register for data change notifications for a subtree or leaf * even if it does not exist. You will receive notification once that node is * created. + * *

* If there is any pre-existing data in the data tree for the path for which you are * registering, you will receive an initial data change event, which will @@ -36,6 +38,7 @@ public interface DOMDataTreeChangeService extends DOMService { * This method returns a {@link ListenerRegistration} object. To * "unregister" your listener for changes call the {@link ListenerRegistration#close()} * method on the returned object. + * *

* You MUST explicitly unregister your listener when you no longer want to receive * notifications. This is especially true in OSGi environments, where failure to @@ -50,5 +53,6 @@ public interface DOMDataTreeChangeService extends DOMService { * your listener using {@link ListenerRegistration#close()} to stop * delivery of change events. */ - @Nonnull ListenerRegistration registerDataTreeChangeListener(@Nonnull DOMDataTreeIdentifier treeId, @Nonnull L listener); + @Nonnull ListenerRegistration registerDataTreeChangeListener( + @Nonnull DOMDataTreeIdentifier treeId, @Nonnull L listener); }