import akka.actor.ActorRef;
import akka.actor.ActorSystem;
+import com.google.common.base.Preconditions;
import java.util.Collection;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
private final RemoteRpcProviderConfig config;
- public RemoteRpcProvider(final ActorSystem actorSystem, final DOMRpcProviderService rpcProvisionRegistry) {
+ public RemoteRpcProvider(final ActorSystem actorSystem,
+ final DOMRpcProviderService rpcProvisionRegistry,
+ final RemoteRpcProviderConfig config) {
this.actorSystem = actorSystem;
this.rpcProvisionRegistry = rpcProvisionRegistry;
- config = new RemoteRpcProviderConfig(actorSystem.settings().config());
+ this.config = Preconditions.checkNotNull(config);
}
@Override
final DOMRpcService rpcService = brokerSession.getService(DOMRpcService.class);
schemaContext = schemaService.getGlobalContext();
rpcManager = actorSystem.actorOf(RpcManager.props(schemaContext,
- rpcProvisionRegistry, rpcService), config.getRpcManagerName());
+ rpcProvisionRegistry, rpcService, config), config.getRpcManagerName());
schemaListenerRegistration = schemaService.registerSchemaContextListener(this);
LOG.debug("rpc manager started");
}