Inline serverChannelInitializer
[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="netconfServerDispatcherImpl"
55           class="org.opendaylight.netconf.impl.NetconfServerDispatcherImpl">
56         <argument>
57             <bean class="org.opendaylight.netconf.impl.ServerChannelInitializer">
58                 <argument>
59                     <bean class="org.opendaylight.netconf.impl.NetconfServerSessionNegotiatorFactory">
60                         <argument ref="global-timer"/>
61                         <argument ref="aggregatedNetconfOperationServiceFactoryMappers"/>
62                         <argument ref="sessionIdProvider"/>
63                         <argument value="${connection-timeout-millis}"/>
64                         <argument ref="netconfMonitoringService"/>
65                     </bean>
66                 </argument>
67             </bean>
68         </argument>
69         <argument ref="globalBossGroup"/>
70         <argument ref="globalWorkerGroup"/>
71     </bean>
72     <service ref="netconfServerDispatcherImpl"
73              interface="org.opendaylight.netconf.api.NetconfServerDispatcher"
74              odl:type="netconf-server-dispatcher">
75     </service>
76
77     <!--NetconfServerMonitoring -->
78
79     <bean id="netconfMonitoringService"
80           class="org.opendaylight.netconf.impl.osgi.NetconfMonitoringServiceImpl"
81           destroy-method="close">
82         <argument ref="aggregatedNetconfOperationServiceFactory"/>
83         <argument ref="scheduledThreadPool"/>
84         <argument value="${monitoring-update-interval}"/>
85     </bean>
86     <service ref="netconfMonitoringService"
87              interface="org.opendaylight.netconf.api.monitoring.NetconfMonitoringService"
88              odl:type="netconf-server-monitoring">
89     </service>
90
91 </blueprint>