Convert NettyBootstrapFactory into a Component
[ovsdb.git] / library / impl / src / main / resources / OSGI-INF / blueprint / library.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
3            xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">
4
5   <!-- Read default values at startup and inject to OvsdbConnectionService-->
6   <cm:property-placeholder persistent-id="org.opendaylight.ovsdb.library" update-strategy="none">
7     <!-- Setting default values, in case library.cfg file is not present
8     or config property is commented out. This will be overridden if user
9     specify the property in library.cfg file-->
10     <cm:default-properties>
11       <cm:property name="ovsdb-listener-ip" value="0.0.0.0"/>
12       <cm:property name="ovsdb-listener-port" value="6640"/>
13       <cm:property name="ovsdb-rpc-task-timeout" value="1000"/>
14       <cm:property name="use-ssl" value="false"/>
15       <cm:property name="json-rpc-decoder-max-frame-length" value="100000"/>
16     </cm:default-properties>
17   </cm:property-placeholder>
18
19   <!-- Notify OvsdbConnectionService with any change in the config properties value-->
20   <bean id="ovsdbConnectionServiceConfigurator" class="org.opendaylight.ovsdb.lib.impl.OvsdbConnectionServiceConfigurator">
21     <argument ref="ovsdbConnectionService"/>
22     <cm:managed-properties persistent-id="org.opendaylight.ovsdb.library"
23                            update-strategy="component-managed"
24                            update-method="updateConfigParameter"/>
25     <property name="ovsdbListenerIp" value="${ovsdb-listener-ip}"/>
26     <property name="ovsdbListenerPort" value="${ovsdb-listener-port}"/>
27     <property name="ovsdbRpcTaskTimeout" value="${ovsdb-rpc-task-timeout}"/>
28     <property name="useSsl" value="${use-ssl}"/>
29     <property name="jsonRpcDecoderMaxFrameLength" value="${json-rpc-decoder-max-frame-length}"/>
30   </bean>
31
32   <reference id="certificateManager" interface="org.opendaylight.aaa.cert.api.ICertificateManager"
33              filter="type=default-certificate-manager"/>
34   <reference id="nettyBootstrapFactory" interface="org.opendaylight.ovsdb.lib.impl.NettyBootstrapFactory"/>
35
36   <bean id="ovsdbConnectionService" class="org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService">
37     <argument ref="nettyBootstrapFactory"/>
38     <argument ref="certificateManager"/>
39   </bean>
40
41   <service ref="ovsdbConnectionService" interface="org.opendaylight.ovsdb.lib.OvsdbConnection"/>
42 </blueprint>