Merge "Add blueprint wiring for netconf-client"
[netconf.git] / netconf / mdsal-netconf-impl / src / main / resources / org / opendaylight / blueprint / mdsal-netconf-impl.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright (c) 2016 Inocybe Technologies Inc. and others.  All rights reserved.
4
5  This program and the accompanying materials are made available under the
6  terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  and is available at http://www.eclipse.org/legal/epl-v10.html
8 -->
9 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
10            xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
11            xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.3.0"
12            odl:restart-dependents-on-updates="true"
13            odl:use-default-for-reference-types="true">
14
15     <!--This is the MD-SAL netconf server implementation blueprint xml file-->
16
17     <reference id="globalBossGroup" interface="io.netty.channel.EventLoopGroup" odl:type="global-boss-group"/>
18     <reference id="globalWorkerGroup" interface="io.netty.channel.EventLoopGroup" odl:type="global-worker-group"/>
19     <reference id="global-timer" interface="io.netty.util.Timer" odl:type="global-timer"/>
20     <reference id="scheduledThreadPool" interface="org.opendaylight.controller.config.threadpool.ScheduledThreadPool"/>
21
22     <cm:property-placeholder persistent-id="org.opendaylight.netconf.impl" update-strategy="none">
23         <cm:default-properties>
24             <cm:property name="connection-timeout-millis" value="20000"/>
25             <cm:property name="monitoring-update-interval" value="6"/>
26         </cm:default-properties>
27     </cm:property-placeholder>
28
29     <!--NetconfMapperAggregator -->
30
31     <bean id="aggregatedNetconfOperationServiceFactory"
32           class="org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory"
33           destroy-method="close">
34     </bean>
35     <service ref="aggregatedNetconfOperationServiceFactory"
36              interface="org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactoryListener"
37              odl:type="mapper-aggregator-registry">
38     </service>
39
40     <!--NetconfServerDispatcher -->
41
42     <bean id="sessionIdProvider"
43           class="org.opendaylight.netconf.impl.SessionIdProvider"/>
44
45     <bean id="aggregatedNetconfOperationServiceFactoryMappers"
46           class="org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory"
47           destroy-method="close">
48         <argument>
49             <list value-type="org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory">
50                 <ref component-id="aggregatedNetconfOperationServiceFactory"/>
51             </list>
52         </argument>
53     </bean>
54
55     <bean id="netconfServerSessionNegotiatorFactory"
56           class="org.opendaylight.netconf.impl.NetconfServerSessionNegotiatorFactory">
57         <argument ref="global-timer"/>
58         <argument ref="aggregatedNetconfOperationServiceFactoryMappers"/>
59         <argument ref="sessionIdProvider"/>
60         <argument value="${connection-timeout-millis}"/>
61         <argument ref="netconfMonitoringService"/>
62         <argument><null/></argument><!--Base capabilities-->
63     </bean>
64
65     <bean id="serverChannelInitializer"
66           class="org.opendaylight.netconf.impl.NetconfServerDispatcherImpl.ServerChannelInitializer">
67         <argument ref="netconfServerSessionNegotiatorFactory"/>
68     </bean>
69
70     <bean id="netconfServerDispatcherImpl"
71           class="org.opendaylight.netconf.impl.NetconfServerDispatcherImpl">
72         <argument ref="serverChannelInitializer"/>
73         <argument ref="globalBossGroup"/>
74         <argument ref="globalWorkerGroup"/>
75     </bean>
76     <service ref="netconfServerDispatcherImpl"
77              interface="org.opendaylight.netconf.api.NetconfServerDispatcher"
78              odl:type="netconf-server-dispatcher">
79     </service>
80
81     <!--NetconfServerMonitoring -->
82
83     <bean id="netconfMonitoringService"
84           class="org.opendaylight.netconf.impl.osgi.NetconfMonitoringServiceImpl">
85         <argument ref="aggregatedNetconfOperationServiceFactory"/>
86         <argument ref="scheduledThreadPool"/>
87         <argument value="${monitoring-update-interval}"/>
88     </bean>
89     <service ref="netconfMonitoringService"
90              interface="org.opendaylight.netconf.api.monitoring.NetconfMonitoringService"
91              odl:type="netconf-server-monitoring">
92     </service>
93
94 </blueprint>