Remove reliance on org.opendaylight.controller.sal.core.api.Broker
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / main / java / org / opendaylight / controller / remote / rpc / RemoteRpcProviderFactory.java
index af36b8afc9b982b82fbb389111fb70821bd52aa6..226faf22dcced063a49fb28a691a0095fc789c6f 100644 (file)
@@ -10,16 +10,12 @@ package org.opendaylight.controller.remote.rpc;
 
 import akka.actor.ActorSystem;
 import org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService;
-import org.opendaylight.controller.sal.core.api.Broker;
-import org.osgi.framework.BundleContext;
+import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
 
 public class RemoteRpcProviderFactory {
-    public static RemoteRpcProvider createInstance(final Broker broker, final BundleContext bundleContext,
-            final ActorSystem actorSystem, final RemoteRpcProviderConfig config) {
+    public static RemoteRpcProvider createInstance(final DOMRpcProviderService rpcProviderService,
+            final DOMRpcService rpcService, final ActorSystem actorSystem, final RemoteRpcProviderConfig config) {
 
-        final RemoteRpcProvider rpcProvider = new RemoteRpcProvider(actorSystem, (DOMRpcProviderService) broker, config);
-
-        broker.registerProvider(rpcProvider);
-        return rpcProvider;
+        return new RemoteRpcProvider(actorSystem, rpcProviderService, rpcService, config);
     }
 }