* 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;
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);
}
EncodingName.RFC8040_JSON, JSONNotificationFormatter.FACTORY,
EncodingName.RFC8040_XML, XMLNotificationFormatter.FACTORY);
- AbstractNotificationSource() {
+ protected AbstractNotificationSource() {
super(ENCODINGS);
}
}