summaryrefslogtreecommitdiffstats
path: root/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-10-13 17:37:54 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-10-17 09:16:26 +0000
commit4273f4e051b5f25ebe932e49e72388e56ef0ffd8 (patch)
tree571387fd4d82cfd721c1093b94786cc8bb14870c /infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java
parent7236617f71a2090aa1aebac37e2b7b51330cdc73 (diff)
HONEYCOMB-225 Bump ODL to Boron
Change-Id: I45e30b4815737dd4bafe39d839d90c9799ad3cb7 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java')
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java
index 2c2631b0b..2554d026c 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.java
@@ -21,8 +21,8 @@ import com.google.inject.name.Named;
import io.fd.honeycomb.infra.distro.ProviderTrait;
import java.lang.reflect.Constructor;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
-import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
@@ -72,16 +72,18 @@ public class NetconfNotificationMapperProvider extends ProviderTrait<NetconfOper
bindingAwareBroker.registerProvider(writer);
final Class<?> notifPublisherCls = Class.forName(
- "org.opendaylight.controller.config.yang.netconf.mdsal.notification.BaseCapabilityChangeNotificationPublisher");
+ "org.opendaylight.controller.config.yang.netconf.mdsal.notification.CapabilityChangeNotificationProducer");
declaredConstructor =
notifPublisherCls.getDeclaredConstructor(BaseNotificationPublisherRegistration.class);
declaredConstructor.setAccessible(true);
- final DataChangeListener publisher = (DataChangeListener) declaredConstructor.newInstance(
- notificationCollector.registerBaseNotificationPublisher());
+ final DataTreeChangeListener<Capabilities> publisher =
+ (DataTreeChangeListener<Capabilities>) declaredConstructor.newInstance(
+ notificationCollector.registerBaseNotificationPublisher());
- ListenerRegistration<DataChangeListener> capabilityChangeListenerRegistration = dataBroker
- .registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, capabilitiesIdentifier,
- publisher, AsyncDataBroker.DataChangeScope.SUBTREE);
+ ListenerRegistration<DataTreeChangeListener<Capabilities>> capabilityChangeListenerRegistration = dataBroker
+ .registerDataTreeChangeListener(
+ new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, capabilitiesIdentifier),
+ publisher);
NetconfNotificationOperationServiceFactory netconfNotificationOperationServiceFactory =
new NetconfNotificationOperationServiceFactory(notificationRegistry);
aggregator.onAddNetconfOperationServiceFactory(netconfNotificationOperationServiceFactory);