Add blueprint wiring to sal-remoterpc-connector
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / main / resources / org / opendaylight / blueprint / remote-rpc.xml
diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/resources/org/opendaylight/blueprint/remote-rpc.xml b/opendaylight/md-sal/sal-remoterpc-connector/src/main/resources/org/opendaylight/blueprint/remote-rpc.xml
new file mode 100644 (file)
index 0000000..453c252
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+    odl:restart-dependents-on-updates="true" odl:use-default-for-reference-types="true">
+
+  <cm:property-placeholder persistent-id="org.opendaylight.controller.remoterpc" update-strategy="none">
+    <cm:default-properties>
+      <cm:property name="enable-metric-capture" value="false"/>
+      <cm:property name="bounded-mailbox-capacity" value="1000"/>
+    </cm:default-properties>
+  </cm:property-placeholder>
+
+  <reference id="actorSystemProvider" interface="org.opendaylight.controller.cluster.ActorSystemProvider" />
+  <reference id="schemaService" interface="org.opendaylight.controller.sal.core.api.model.SchemaService" />
+  <reference id="domRpcService" interface="org.opendaylight.controller.md.sal.dom.api.DOMRpcService"/>
+  <reference id="domRpcRegistry" interface="org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService"/>
+
+  <bean id="actorSystem" factory-ref="actorSystemProvider" factory-method="getActorSystem"/>
+
+  <bean id="remoteRpcProviderConfig" class="org.opendaylight.controller.remote.rpc.RemoteRpcProviderConfig"
+          factory-method="newInstance">
+    <argument>
+      <bean factory-ref="actorSystem" factory-method="name"/>
+    </argument>
+    <argument value="${enable-metric-capture}"/>
+    <argument value="${bounded-mailbox-capacity}"/>
+  </bean>
+
+  <bean id="remoteRpcProvider" class="org.opendaylight.controller.remote.rpc.RemoteRpcProviderFactory"
+          factory-method="createInstance" init-method="start" destroy-method="close">
+    <argument ref="domRpcRegistry"/>
+    <argument ref="actorSystem"/>
+    <argument ref="remoteRpcProviderConfig"/>
+    <property name="schemaService" ref="schemaService"/>
+    <property name="rpcService" ref="domRpcService"/>
+  </bean>
+
+</blueprint>