Turn PceServiceRPCImpl into a Component
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / impl / PceProvider.java
index bab1554114ad7fe1e80d1f2f4e90311a3a6464d6..273c68179b78af974d92255f2295489e2dcaa75f 100644 (file)
@@ -28,15 +28,15 @@ public class PceProvider {
     private static final Logger LOG = LoggerFactory.getLogger(PceProvider.class);
 
     private final RpcProviderService rpcService;
-    private ObjectRegistration<PceServiceRPCImpl> rpcRegistration;
+    private ObjectRegistration<TransportpcePceService> rpcRegistration;
 
     @Activate
     public PceProvider(@Reference RpcProviderService rpcProviderService,
-            @Reference PathComputationService pathComputationService) {
+            @Reference PathComputationService pathComputationService,
+            @Reference TransportpcePceService pceServiceRPCImpl) {
         this.rpcService = rpcProviderService;
+        rpcRegistration = rpcService.registerRpcImplementation(TransportpcePceService.class, pceServiceRPCImpl);
         LOG.info("PceProvider Session Initiated");
-        final PceServiceRPCImpl consumer = new PceServiceRPCImpl(pathComputationService);
-        rpcRegistration = rpcService.registerRpcImplementation(TransportpcePceService.class, consumer);
     }
 
     /*