- //private ListenerRegistration<ServicehandlerListener> ServicehandlerlistenerRegistration;
- /* Listener register for StubPce Notification. */
- private ListenerRegistration<StubpceListener> stubPcelistenerRegistration;
- /* Listener register for StubRender Notification. */
- private ListenerRegistration<StubrendererListener> stubRendererlistenerRegistration;
- private RpcRegistration<ServicehandlerService> rpcRegistration;
-
-
- public ServicehandlerProvider(final DataBroker dataBroker, RpcProviderRegistry rpcProviderRegistry,
- NotificationService notificationService, NotificationPublishService notificationPublishService) {
- this.dataBroker = dataBroker;
- this.rpcRegistry = rpcProviderRegistry;
- this.notificationService = notificationService;
- this.notificationPublishService = notificationPublishService;
- }
-
- /**
- * Method called when the blueprint container is created.
- */
- public void init() {
+ @Activate
+ public ServicehandlerProvider(@Reference final DataBroker dataBroker,
+ @Reference NotificationService notificationService,
+ @Reference ServiceDataStoreOperations serviceDataStoreOperations,
+ @Reference TransportpcePceListener pceListenerImpl,
+ @Reference TransportpceRendererListener rendererListenerImpl,
+ @Reference TransportpceNetworkmodelListener networkModelListenerImpl,
+ @Reference NotificationPublishService notificationPublishService,
+ @Reference OrgOpenroadmServiceService servicehandler,
+ @Reference DataTreeChangeListener<Services> serviceListener) {
+ this.serviceDataStoreOperations = serviceDataStoreOperations;
+ this.serviceDataStoreOperations.initialize();
+ pcelistenerRegistration = notificationService.registerNotificationListener(pceListenerImpl);
+ rendererlistenerRegistration = notificationService.registerNotificationListener(rendererListenerImpl);
+ networkmodellistenerRegistration = notificationService.registerNotificationListener(networkModelListenerImpl);
+ serviceDataTreeChangeListenerRegistration = dataBroker.registerDataTreeChangeListener(
+ DataTreeIdentifier.create(LogicalDatastoreType.OPERATIONAL, SERVICE), serviceListener);