Split out NetconfMapperAggregator
[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     <reference id="sessionIdProvider"
30                interface="org.opendaylight.netconf.impl.SessionIdProvider"/>
31     <reference id="aggregatedNetconfOperationServiceFactory"
32                interface="org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory"
33                odl:type="mapper-aggregator-registry"/>
34
35     <cm:property-placeholder persistent-id="org.opendaylight.netconf.impl" update-strategy="none">
36         <cm:default-properties>
37             <cm:property name="connection-timeout-millis" value="20000"/>
38             <cm:property name="monitoring-update-interval" value="6"/>
39         </cm:default-properties>
40     </cm:property-placeholder>
41
42     <!--NetconfServerDispatcher -->
43
44     <bean id="aggregatedNetconfOperationServiceFactoryMappers"
45           class="org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory"
46           destroy-method="close">
47         <argument>
48             <list value-type="org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory">
49                 <ref component-id="aggregatedNetconfOperationServiceFactory"/>
50             </list>
51         </argument>
52     </bean>
53
54     <bean id="netconfServerSessionNegotiatorFactory"
55           class="org.opendaylight.netconf.impl.NetconfServerSessionNegotiatorFactory">
56         <argument ref="global-timer"/>
57         <argument ref="aggregatedNetconfOperationServiceFactoryMappers"/>
58         <argument ref="sessionIdProvider"/>
59         <argument value="${connection-timeout-millis}"/>
60         <argument ref="netconfMonitoringService"/>
61     </bean>
62
63     <bean id="serverChannelInitializer"
64           class="org.opendaylight.netconf.impl.ServerChannelInitializer">
65         <argument ref="netconfServerSessionNegotiatorFactory"/>
66     </bean>
67
68     <bean id="netconfServerDispatcherImpl"
69           class="org.opendaylight.netconf.impl.NetconfServerDispatcherImpl">
70         <argument ref="serverChannelInitializer"/>
71         <argument ref="globalBossGroup"/>
72         <argument ref="globalWorkerGroup"/>
73     </bean>
74     <service ref="netconfServerDispatcherImpl"
75              interface="org.opendaylight.netconf.api.NetconfServerDispatcher"
76              odl:type="netconf-server-dispatcher">
77     </service>
78
79     <!--NetconfServerMonitoring -->
80
81     <bean id="netconfMonitoringService"
82           class="org.opendaylight.netconf.impl.osgi.NetconfMonitoringServiceImpl"
83           destroy-method="close">
84         <argument ref="aggregatedNetconfOperationServiceFactory"/>
85         <argument ref="scheduledThreadPool"/>
86         <argument value="${monitoring-update-interval}"/>
87     </bean>
88     <service ref="netconfMonitoringService"
89              interface="org.opendaylight.netconf.api.monitoring.NetconfMonitoringService"
90              odl:type="netconf-server-monitoring">
91     </service>
92
93 </blueprint>