Introduce restconf.server.{api,spi,mdsal}
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / server / mdsal / streams / notif / AbstractNotificationSource.java
@@ -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,21 +14,20 @@ import java.time.Instant;
 import org.opendaylight.mdsal.dom.api.DOMEvent;
 import org.opendaylight.mdsal.dom.api.DOMNotification;
 import org.opendaylight.mdsal.dom.api.DOMNotificationListener;
-import org.opendaylight.restconf.nb.rfc8040.streams.RestconfStream.EncodingName;
-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.EncodingName;
+import org.opendaylight.restconf.server.spi.RestconfStream.Sink;
+import org.opendaylight.restconf.server.spi.RestconfStream.Source;
 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextProvider;
 
 /**
- * Abstract base class for functionality shared between {@link NotificationSource} and
- * {@link DeviceNotificationSource}.
+ * Abstract base class for functionality shared between {@link DOMNotification}-based sources.
  */
-abstract class AbstractNotificationSource extends Source<DOMNotification> {
-    static final class Listener implements DOMNotificationListener {
+public abstract class AbstractNotificationSource extends Source<DOMNotification> {
+    protected static final class Listener implements DOMNotificationListener {
         private final Sink<DOMNotification> sink;
         private final EffectiveModelContextProvider modelContext;
 
-        Listener(final Sink<DOMNotification> sink, final EffectiveModelContextProvider modelContext) {
+        public Listener(final Sink<DOMNotification> sink, final EffectiveModelContextProvider modelContext) {
             this.sink = requireNonNull(sink);
             this.modelContext = requireNonNull(modelContext);
         }
@@ -44,7 +43,7 @@ abstract class AbstractNotificationSource extends Source<DOMNotification> {
         EncodingName.RFC8040_JSON, JSONNotificationFormatter.FACTORY,
         EncodingName.RFC8040_XML, XMLNotificationFormatter.FACTORY);
 
-    AbstractNotificationSource() {
+    protected AbstractNotificationSource() {
         super(ENCODINGS);
     }
 }