484de873f19883eaa7849fcec039b9d2f1823007
[netconf.git] / restconf / restconf-nb-rfc8040 / 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:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
11            xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
12            xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.4.0"
13            odl:use-default-for-reference-types="true">
14
15   <!-- Restconf providers -->
16   <!--
17     This cfg file defines the type of the DOMDataBroker service to use. 'default' indicates to use
18     the default DOMDataBroker provided by MD-SAL. This setting is useful for providing a custom
19     DOMDataBroker implementation that does, e.g., validation or additional security checking on
20     top of the default DOMDataBroker.
21   -->
22   <cm:property-placeholder persistent-id="org.opendaylight.restconf.databroker"
23         placeholder-prefix = "@{" placeholder-suffix = "}" update-strategy="reload">
24     <cm:default-properties>
25       <cm:property name="databroker-service-type" value="default"/>
26     </cm:default-properties>
27   </cm:property-placeholder>
28
29   <cm:property-placeholder persistent-id="org.opendaylight.restconf.nb.rfc8040">
30     <cm:default-properties>
31       <cm:property name="maximum-fragment-length" value="0"/>
32       <cm:property name="heartbeat-interval" value="10000"/>
33       <cm:property name="idle-timeout" value="30000"/>
34       <cm:property name="ping-executor-name-prefix" value="ping-executor"/>
35       <cm:property name="max-thread-count" value="1"/>
36       <cm:property name="use-sse" value="true"/>
37     </cm:default-properties>
38   </cm:property-placeholder>
39
40   <reference id="dOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
41           ext:filter="(type=@{databroker-service-type})"/>
42
43   <bean id="threadPoolFactory"
44         class="org.opendaylight.controller.config.threadpool.util.NamingThreadPoolFactory">
45     <argument value="${ping-executor-name-prefix}"/>
46   </bean>
47
48   <bean id="scheduledThreadPool"
49         class="org.opendaylight.controller.config.threadpool.util.ScheduledThreadPoolWrapper">
50     <argument value="${max-thread-count}"/>
51     <argument ref="threadPoolFactory"/>
52   </bean>
53
54   <bean id="configuration"
55         class="org.opendaylight.restconf.nb.rfc8040.streams.Configuration">
56     <argument value="${maximum-fragment-length}"/>
57     <argument value="${idle-timeout}"/>
58     <argument value="${heartbeat-interval}"/>
59     <argument value="${use-sse}" />
60   </bean>
61
62 </blueprint>