+ TapiContext tapiContext = new TapiContext(this.networkTransactionService);
+ LOG.info("Empty TAPI context created: {}", tapiContext.getTapiContext());
+ TapiLink tapiLink = new TapiLinkImpl(this.networkTransactionService);
+ TopologyUtils topologyUtils = new TopologyUtils(this.networkTransactionService, this.dataBroker, tapiLink);
+ ConnectivityUtils connectivityUtils = new ConnectivityUtils(this.serviceDataStoreOperations, new HashMap<>(),
+ tapiContext, this.networkTransactionService);
+ TapiInitialORMapping tapiInitialORMapping = new TapiInitialORMapping(topologyUtils, connectivityUtils,
+ tapiContext, this.serviceDataStoreOperations);
+ tapiInitialORMapping.performTopoInitialMapping();
+ tapiInitialORMapping.performServInitialMapping();
+ TapiPceNotificationHandler pceListenerImpl = new TapiPceNotificationHandler(dataBroker);
+ TapiRendererNotificationHandler rendererListenerImpl = new TapiRendererNotificationHandler(dataBroker,
+ notificationPublishService);
+
+ TapiConnectivityImpl tapiConnectivity = new TapiConnectivityImpl(this.serviceHandler, tapiContext,
+ connectivityUtils, pceListenerImpl, rendererListenerImpl);
+ rpcRegistrations.add(rpcProviderService.registerRpcImplementations(tapiConnectivity.registerRPCs()));
+ TapiTopologyImpl topo = new TapiTopologyImpl(this.dataBroker, tapiContext, topologyUtils, tapiLink);
+ rpcRegistrations.add(rpcProviderService.registerRpcImplementations(topo.registerRPCs()));
+
+ this.listeners = new ArrayList<>();
+ TapiNetconfTopologyListener topologyListener = new TapiNetconfTopologyListener(tapiNetworkModelServiceImpl);
+ TapiOrLinkListener orLinkListener = new TapiOrLinkListener(tapiLink, networkTransactionService);
+ TapiPortMappingListener tapiPortMappingListener = new TapiPortMappingListener(tapiNetworkModelServiceImpl);
+ listeners.add(dataBroker.registerDataTreeChangeListener(
+ DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, LINK_II), orLinkListener));
+ listeners.add(dataBroker.registerDataTreeChangeListener(
+ DataTreeIdentifier.create(LogicalDatastoreType.OPERATIONAL, InstanceIdentifiers.NETCONF_TOPOLOGY_II
+ .child(Node.class)),
+ topologyListener));
+ listeners.add(dataBroker.registerDataTreeChangeListener(
+ DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, MAPPING_II), tapiPortMappingListener));
+ TapiListener tapiListener = new TapiListener();
+ listeners.add(dataBroker.registerDataTreeChangeListener(
+ DataTreeIdentifier.create(
+ LogicalDatastoreType.CONFIGURATION,
+ InstanceIdentifier.create(ServiceInterfacePoints.class)),
+ tapiListener));
+ // Notification Listener
+ pcelistenerRegistration = notificationService.registerCompositeListener(pceListenerImpl.getCompositeListener());
+ rendererlistenerRegistration = notificationService
+ .registerCompositeListener(rendererListenerImpl.getCompositeListener());
+ TapiServiceNotificationHandler serviceHandlerListenerImpl = new TapiServiceNotificationHandler(dataBroker);
+ servicehandlerlistenerRegistration = notificationService
+ .registerCompositeListener(serviceHandlerListenerImpl.getCompositeListener());
+ tapinetworkmodellistenerRegistration = notificationService
+ .registerCompositeListener(tapiNetworkModelNotificationHandler.getCompositeListener());