1 package org.opendaylight.controller.config.yang.config.remote_rpc_connector;
3 import org.opendaylight.controller.cluster.common.actor.DefaultAkkaConfigurationReader;
4 import org.opendaylight.controller.remote.rpc.RemoteRpcProviderConfig;
5 import org.opendaylight.controller.remote.rpc.RemoteRpcProviderFactory;
6 import org.opendaylight.controller.sal.core.api.Broker;
7 import org.osgi.framework.BundleContext;
9 public class RemoteRPCBrokerModule extends org.opendaylight.controller.config.yang.config.remote_rpc_connector.AbstractRemoteRPCBrokerModule {
10 private BundleContext bundleContext;
11 public RemoteRPCBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
12 super(identifier, dependencyResolver);
15 public RemoteRPCBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.yang.config.remote_rpc_connector.RemoteRPCBrokerModule oldModule, java.lang.AutoCloseable oldInstance) {
16 super(identifier, dependencyResolver, oldModule, oldInstance);
20 public void customValidation() {
21 // add custom validation form module attributes here.
25 public boolean canReuseInstance(AbstractRemoteRPCBrokerModule oldModule) {
30 public java.lang.AutoCloseable createInstance() {
31 Broker broker = getDomBrokerDependency();
33 RemoteRpcProviderConfig config = new RemoteRpcProviderConfig.Builder(getActorSystemName())
34 .metricCaptureEnabled(getEnableMetricCapture())
35 .mailboxCapacity(getBoundedMailboxCapacity())
36 .withConfigReader(new DefaultAkkaConfigurationReader())
39 return RemoteRpcProviderFactory.createInstance(broker, bundleContext, config);
42 public void setBundleContext(BundleContext bundleContext) {
43 this.bundleContext = bundleContext;