Service-notification handling for Renderer
[transportpce.git] / servicehandler / src / main / java / org / opendaylight / transportpce / servicehandler / impl / ServicehandlerProvider.java
index e2ba6b0c710816981a7909f7c0711caa30861d98..003637e5e7e2c57ca73eea526e228fd1a7b5100e 100644 (file)
@@ -13,6 +13,7 @@ import org.opendaylight.controller.md.sal.binding.api.NotificationService;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.transportpce.pce.service.PathComputationService;
+import org.opendaylight.transportpce.renderer.NetworkModelWavelengthService;
 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
 import org.opendaylight.transportpce.servicehandler.listeners.PceListenerImpl;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev170426.TransportpcePceListener;
@@ -34,6 +35,7 @@ public class ServicehandlerProvider {
     private final DataBroker dataBroker;
     private final RpcProviderRegistry rpcRegistry;
     private final NotificationService notificationService;
+    private final NetworkModelWavelengthService networkModelWavelengthService;
     private ListenerRegistration<TransportpcePceListener> pcelistenerRegistration;
     private RpcRegistration<OrgOpenroadmServiceService> rpcRegistration;
     private PathComputationService pathComputationService;
@@ -41,12 +43,14 @@ public class ServicehandlerProvider {
 
     public ServicehandlerProvider(final DataBroker dataBroker, RpcProviderRegistry rpcProviderRegistry,
             NotificationService notificationService, PathComputationService pathComputationService,
-            RendererServiceOperations rendererServiceOperations) {
+            RendererServiceOperations rendererServiceOperations,
+            NetworkModelWavelengthService networkModelWavelengthService) {
         this.dataBroker = dataBroker;
         this.rpcRegistry = rpcProviderRegistry;
         this.notificationService = notificationService;
         this.pathComputationService = pathComputationService;
         this.rendererServiceOperations = rendererServiceOperations;
+        this.networkModelWavelengthService = networkModelWavelengthService;
     }
 
     /**
@@ -55,9 +59,8 @@ public class ServicehandlerProvider {
     public void init() {
         LOG.info("ServicehandlerProvider Session Initiated");
         final ServicehandlerImpl servicehandler = new ServicehandlerImpl(dataBroker, pathComputationService,
-                rendererServiceOperations);
+                rendererServiceOperations, networkModelWavelengthService);
         final PceListenerImpl pceListener = new PceListenerImpl();
-        pcelistenerRegistration = notificationService.registerNotificationListener(pceListener);
         rpcRegistration = rpcRegistry.addRpcImplementation(OrgOpenroadmServiceService.class, servicehandler);
     }