X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Fconfig%2Fremote_rpc_connector%2FRemoteRPCBrokerModule.java;h=e4631f965dbd0566a1baaa992a9ae65d779a2f72;hp=c68503c0fa313bbbd48a3d3cd5538f489acaeaf3;hb=dceb9db7853dabfbd4abdfb3d886a79871097831;hpb=9e525899b4f66248ac4efac0a70cf0dc74305f95 diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/config/yang/config/remote_rpc_connector/RemoteRPCBrokerModule.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/config/yang/config/remote_rpc_connector/RemoteRPCBrokerModule.java index c68503c0fa..e4631f965d 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/config/yang/config/remote_rpc_connector/RemoteRPCBrokerModule.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/config/yang/config/remote_rpc_connector/RemoteRPCBrokerModule.java @@ -8,14 +8,9 @@ package org.opendaylight.controller.config.yang.config.remote_rpc_connector; -import akka.actor.ActorSystem; -import org.opendaylight.controller.remote.rpc.RemoteRpcProviderConfig; -import org.opendaylight.controller.remote.rpc.RemoteRpcProviderFactory; -import org.opendaylight.controller.sal.core.api.Broker; -import org.osgi.framework.BundleContext; +import org.opendaylight.controller.sal.common.util.NoopAutoCloseable; public class RemoteRPCBrokerModule extends org.opendaylight.controller.config.yang.config.remote_rpc_connector.AbstractRemoteRPCBrokerModule { - private BundleContext bundleContext; public RemoteRPCBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { super(identifier, dependencyResolver); } @@ -35,19 +30,9 @@ public class RemoteRPCBrokerModule extends org.opendaylight.controller.config.ya } @Override - public java.lang.AutoCloseable createInstance() { - Broker broker = getDomBrokerDependency(); - - ActorSystem actorSystem = getActorSystemProviderDependency().getActorSystem(); - RemoteRpcProviderConfig config = new RemoteRpcProviderConfig.Builder(actorSystem.name()) - .metricCaptureEnabled(getEnableMetricCapture()) - .mailboxCapacity(getBoundedMailboxCapacity()) - .build(); - - return RemoteRpcProviderFactory.createInstance(broker, bundleContext, actorSystem, config); - } - - public void setBundleContext(BundleContext bundleContext) { - this.bundleContext = bundleContext; + public AutoCloseable createInstance() { + // The RemoteRpcProvider is created via blueprint and doesn't advertise any services so return a + // no-op here for backwards compatibility. + return NoopAutoCloseable.INSTANCE; } }