Introduce restconf.server.{api,spi,mdsal}
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / server / mdsal / streams / notif / NotificationSource.java
similarity index 79%
rename from restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/NotificationSource.java
rename to restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/mdsal/streams/notif/NotificationSource.java
index c12b33779fc45340769e0553a9a75377df6f00ea..15ed3a05b995c48542b9aa2bd87ff6cc9c328052 100644 (file)
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.restconf.nb.rfc8040.streams;
+package org.opendaylight.restconf.server.mdsal.streams.notif;
 
 import static java.util.Objects.requireNonNull;
 
@@ -14,8 +14,8 @@ import com.google.common.collect.ImmutableSet;
 import org.opendaylight.mdsal.dom.api.DOMNotification;
 import org.opendaylight.mdsal.dom.api.DOMNotificationService;
 import org.opendaylight.restconf.nb.rfc8040.databind.DatabindProvider;
-import org.opendaylight.restconf.nb.rfc8040.streams.RestconfStream.Sink;
-import org.opendaylight.restconf.nb.rfc8040.streams.RestconfStream.Source;
+import org.opendaylight.restconf.server.spi.RestconfStream.Sink;
+import org.opendaylight.restconf.server.spi.RestconfStream.Source;
 import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
@@ -23,7 +23,7 @@ import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absol
 /**
  * A {@link Source} reporting YANG notifications.
  */
-public final class NotificationSource extends AbstractNotificationSource {
+final class NotificationSource extends AbstractNotificationSource {
     private final DatabindProvider databindProvider;
     private final DOMNotificationService notificationService;
     private final ImmutableSet<QName> qnames;
@@ -35,15 +35,6 @@ public final class NotificationSource extends AbstractNotificationSource {
         this.qnames = requireNonNull(qnames);
     }
 
-    /**
-     * Return notification QNames.
-     *
-     * @return The YANG notification {@link QName}s this listener is bound to
-     */
-    public ImmutableSet<QName> qnames() {
-        return qnames;
-    }
-
     @Override
     protected Registration start(final Sink<DOMNotification> sink) {
         return notificationService.registerNotificationListener(