999294f0fbc2154373b4292c132196e104513eb4
[netconf.git] / netconf / mdsal-netconf-impl / src / main / resources / OSGI-INF / 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"
18                interface="io.netty.channel.EventLoopGroup"
19                odl:type="global-boss-group"/>
20     <reference id="globalWorkerGroup"
21                interface="io.netty.channel.EventLoopGroup"
22                odl:type="global-worker-group"/>
23     <reference id="global-timer"
24                interface="io.netty.util.Timer"
25                odl:type="global-timer"/>
26     <reference id="scheduledThreadPool"
27                interface="org.opendaylight.controller.config.threadpool.ScheduledThreadPool"
28                odl:type="global-netconf-ssh-scheduled-executor"/>
29
30     <cm:property-placeholder persistent-id="org.opendaylight.netconf.impl" update-strategy="none">
31         <cm:default-properties>
32             <cm:property name="connection-timeout-millis" value="20000"/>
33             <cm:property name="monitoring-update-interval" value="6"/>
34         </cm:default-properties>
35     </cm:property-placeholder>
36
37     <!--NetconfMapperAggregator -->
38
39     <bean id="aggregatedNetconfOperationServiceFactory"
40           class="org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory"
41           destroy-method="close">
42     </bean>
43     <service ref="aggregatedNetconfOperationServiceFactory"
44              interface="org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactoryListener"
45              odl:type="mapper-aggregator-registry">
46     </service>
47
48     <!--NetconfServerDispatcher -->
49
50     <bean id="sessionIdProvider"
51           class="org.opendaylight.netconf.impl.SessionIdProvider"/>
52
53     <bean id="aggregatedNetconfOperationServiceFactoryMappers"
54           class="org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory"
55           destroy-method="close">
56         <argument>
57             <list value-type="org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory">
58                 <ref component-id="aggregatedNetconfOperationServiceFactory"/>
59             </list>
60         </argument>
61     </bean>
62
63     <bean id="netconfServerSessionNegotiatorFactory"
64           class="org.opendaylight.netconf.impl.NetconfServerSessionNegotiatorFactory">
65         <argument ref="global-timer"/>
66         <argument ref="aggregatedNetconfOperationServiceFactoryMappers"/>
67         <argument ref="sessionIdProvider"/>
68         <argument value="${connection-timeout-millis}"/>
69         <argument ref="netconfMonitoringService"/>
70     </bean>
71
72     <bean id="serverChannelInitializer"
73           class="org.opendaylight.netconf.impl.ServerChannelInitializer">
74         <argument ref="netconfServerSessionNegotiatorFactory"/>
75     </bean>
76
77     <bean id="netconfServerDispatcherImpl"
78           class="org.opendaylight.netconf.impl.NetconfServerDispatcherImpl">
79         <argument ref="serverChannelInitializer"/>
80         <argument ref="globalBossGroup"/>
81         <argument ref="globalWorkerGroup"/>
82     </bean>
83     <service ref="netconfServerDispatcherImpl"
84              interface="org.opendaylight.netconf.api.NetconfServerDispatcher"
85              odl:type="netconf-server-dispatcher">
86     </service>
87
88     <!--NetconfServerMonitoring -->
89
90     <bean id="netconfMonitoringService"
91           class="org.opendaylight.netconf.impl.osgi.NetconfMonitoringServiceImpl"
92           destroy-method="close">
93         <argument ref="aggregatedNetconfOperationServiceFactory"/>
94         <argument ref="scheduledThreadPool"/>
95         <argument value="${monitoring-update-interval}"/>
96     </bean>
97     <service ref="netconfMonitoringService"
98              interface="org.opendaylight.netconf.api.monitoring.NetconfMonitoringService"
99              odl:type="netconf-server-monitoring">
100     </service>
101
102 </blueprint>