Rename restconf-nb-rfc8040 to restconf-nb
[netconf.git] / restconf / restconf-nb / src / main / resources / OSGI-INF / blueprint / restconf-bp.xml
diff --git a/restconf/restconf-nb/src/main/resources/OSGI-INF/blueprint/restconf-bp.xml b/restconf/restconf-nb/src/main/resources/OSGI-INF/blueprint/restconf-bp.xml
new file mode 100644 (file)
index 0000000..8929b4c
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2017 Pantheon technologies s.r.o. and others.  All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">
+  <!-- Restconf providers -->
+  <cm:property-placeholder persistent-id="org.opendaylight.restconf.nb.rfc8040">
+    <cm:default-properties>
+      <cm:property name="maximum-fragment-length" value="0"/>
+      <cm:property name="heartbeat-interval" value="10000"/>
+      <cm:property name="idle-timeout" value="30000"/>
+      <cm:property name="ping-executor-name-prefix" value="ping-executor"/>
+      <cm:property name="max-thread-count" value="1"/>
+      <cm:property name="use-sse" value="true"/>
+    </cm:default-properties>
+  </cm:property-placeholder>
+
+  <bean id="threadPoolFactory"
+        class="org.opendaylight.controller.config.threadpool.util.NamingThreadPoolFactory">
+    <argument value="${ping-executor-name-prefix}"/>
+  </bean>
+
+  <bean id="scheduledThreadPool"
+        class="org.opendaylight.controller.config.threadpool.util.ScheduledThreadPoolWrapper">
+    <argument value="${max-thread-count}"/>
+    <argument ref="threadPoolFactory"/>
+  </bean>
+
+  <bean id="configuration"
+        class="org.opendaylight.restconf.nb.rfc8040.streams.Configuration">
+    <argument value="${maximum-fragment-length}"/>
+    <argument value="${idle-timeout}"/>
+    <argument value="${heartbeat-interval}"/>
+    <argument value="${use-sse}" />
+  </bean>
+
+  <bean id="dataStreamApplication" class="org.opendaylight.restconf.nb.rfc8040.DataStreamApplication">
+    <argument ref="schemaContextHandler"/>
+    <argument ref="dOMMountPointService"/>
+    <argument ref="restconfDataStreamServiceImpl"/>
+  </bean>
+  <bean id="restconfApplication" class="org.opendaylight.restconf.nb.rfc8040.RestconfApplication">
+    <argument ref="schemaContextHandler"/>
+    <argument ref="dOMMountPointService"/>
+    <argument ref="dOMDataBroker"/>
+    <argument ref="dOMRpcService"/>
+    <argument ref="dOMActionService"/>
+    <argument ref="dOMNotificationService"/>
+    <argument ref="dOMSchemaService"/>
+    <argument ref="configuration"/>
+  </bean>
+  <bean id="restconfDataStreamServiceImpl" class="org.opendaylight.restconf.nb.rfc8040.rests.services.impl.RestconfDataStreamServiceImpl">
+    <argument ref="scheduledThreadPool"/>
+    <argument ref="configuration"/>
+  </bean>
+  <bean id="schemaContextHandler" class="org.opendaylight.restconf.nb.rfc8040.handlers.SchemaContextHandler" init-method="init" destroy-method="close">
+    <argument ref="dOMDataBroker"/>
+    <argument ref="dOMSchemaService"/>
+  </bean>
+  <bean id="webInitializer" class="org.opendaylight.restconf.nb.rfc8040.web.WebInitializer" destroy-method="close">
+    <argument ref="webServer"/>
+    <argument ref="webContextSecurer"/>
+    <argument ref="servletSupport"/>
+    <argument ref="restconfApplication"/>
+    <argument ref="dataStreamApplication"/>
+    <argument ref="customFilterAdapterConfiguration"/>
+    <argument ref="webSocketInitializer"/>
+  </bean>
+  <bean id="webSocketInitializer" class="org.opendaylight.restconf.nb.rfc8040.streams.WebSocketInitializer">
+    <argument ref="scheduledThreadPool"/>
+    <argument ref="configuration"/>
+  </bean>
+  <reference id="customFilterAdapterConfiguration" interface="org.opendaylight.aaa.filterchain.configuration.CustomFilterAdapterConfiguration"/>
+  <reference id="webContextSecurer" interface="org.opendaylight.aaa.web.WebContextSecurer"/>
+  <reference id="webServer" interface="org.opendaylight.aaa.web.WebServer"/>
+  <reference id="servletSupport" interface="org.opendaylight.aaa.web.servlet.ServletSupport"/>
+  <reference id="dOMActionService" interface="org.opendaylight.mdsal.dom.api.DOMActionService"/>
+  <reference id="dOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"/>
+  <reference id="dOMMountPointService" interface="org.opendaylight.mdsal.dom.api.DOMMountPointService"/>
+  <reference id="dOMNotificationService" interface="org.opendaylight.mdsal.dom.api.DOMNotificationService"/>
+  <reference id="dOMRpcService" interface="org.opendaylight.mdsal.dom.api.DOMRpcService"/>
+  <reference id="dOMSchemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
+</blueprint>