Inline restconfApplication
[netconf.git] / restconf / restconf-nb / src / main / resources / OSGI-INF / blueprint / restconf-bp.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright (c) 2017 Pantheon technologies s.r.o. 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:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">
11   <!-- Restconf providers -->
12   <cm:property-placeholder persistent-id="org.opendaylight.restconf.nb.rfc8040">
13     <cm:default-properties>
14       <cm:property name="maximum-fragment-length" value="0"/>
15       <cm:property name="heartbeat-interval" value="10000"/>
16       <cm:property name="idle-timeout" value="30000"/>
17       <cm:property name="ping-executor-name-prefix" value="ping-executor"/>
18       <cm:property name="max-thread-count" value="1"/>
19       <cm:property name="use-sse" value="true"/>
20     </cm:default-properties>
21   </cm:property-placeholder>
22
23   <bean id="scheduledThreadPool"
24         class="org.opendaylight.controller.config.threadpool.util.ScheduledThreadPoolWrapper">
25     <argument value="${max-thread-count}"/>
26     <argument>
27       <bean class="org.opendaylight.controller.config.threadpool.util.NamingThreadPoolFactory">
28         <argument value="${ping-executor-name-prefix}"/>
29       </bean>
30     </argument>
31   </bean>
32
33   <bean id="configuration"
34         class="org.opendaylight.restconf.nb.rfc8040.streams.Configuration">
35     <argument value="${maximum-fragment-length}"/>
36     <argument value="${idle-timeout}"/>
37     <argument value="${heartbeat-interval}"/>
38     <argument value="${use-sse}" />
39   </bean>
40
41   <bean id="restconfDataStreamServiceImpl" class="org.opendaylight.restconf.nb.rfc8040.rests.services.impl.RestconfDataStreamServiceImpl">
42     <argument ref="scheduledThreadPool"/>
43     <argument ref="configuration"/>
44   </bean>
45   <bean id="webInitializer" class="org.opendaylight.restconf.nb.rfc8040.web.WebInitializer" destroy-method="close">
46     <argument ref="webServer"/>
47     <argument ref="webContextSecurer"/>
48     <argument ref="servletSupport"/>
49     <argument>
50       <bean class="org.opendaylight.restconf.nb.rfc8040.RestconfApplication">
51         <argument ref="databindProvider"/>
52         <argument ref="dOMMountPointService"/>
53         <argument ref="dOMDataBroker"/>
54         <argument ref="dOMRpcService"/>
55         <argument ref="dOMActionService"/>
56         <argument ref="dOMNotificationService"/>
57         <argument ref="dOMSchemaService"/>
58         <argument ref="configuration"/>
59       </bean>
60     </argument>
61     <argument>
62       <bean class="org.opendaylight.restconf.nb.rfc8040.DataStreamApplication">
63         <argument ref="databindProvider"/>
64         <argument ref="dOMMountPointService"/>
65         <argument ref="restconfDataStreamServiceImpl"/>
66       </bean>
67     </argument>
68     <argument ref="customFilterAdapterConfiguration"/>
69     <argument ref="webSocketInitializer"/>
70   </bean>
71   <bean id="webSocketInitializer" class="org.opendaylight.restconf.nb.rfc8040.streams.WebSocketInitializer">
72     <argument ref="scheduledThreadPool"/>
73     <argument ref="configuration"/>
74   </bean>
75   <reference id="databindProvider" interface="org.opendaylight.restconf.nb.rfc8040.databind.DatabindProvider"/>
76   <reference id="customFilterAdapterConfiguration" interface="org.opendaylight.aaa.filterchain.configuration.CustomFilterAdapterConfiguration"/>
77   <reference id="webContextSecurer" interface="org.opendaylight.aaa.web.WebContextSecurer"/>
78   <reference id="webServer" interface="org.opendaylight.aaa.web.WebServer"/>
79   <reference id="servletSupport" interface="org.opendaylight.aaa.web.servlet.ServletSupport"/>
80   <reference id="dOMActionService" interface="org.opendaylight.mdsal.dom.api.DOMActionService"/>
81   <reference id="dOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"/>
82   <reference id="dOMMountPointService" interface="org.opendaylight.mdsal.dom.api.DOMMountPointService"/>
83   <reference id="dOMNotificationService" interface="org.opendaylight.mdsal.dom.api.DOMNotificationService"/>
84   <reference id="dOMRpcService" interface="org.opendaylight.mdsal.dom.api.DOMRpcService"/>
85   <reference id="dOMSchemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
86 </blueprint>