Porting of WebSockets to Jetty in RFC-8040 RESTCONF
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / resources / OSGI-INF / blueprint / restconf-bp.xml
index b009a9ae6439a6d938ce54ebc5d73d13e9020775..7365af54282eb8cc433f3bf25561c352fa729ba0 100644 (file)
     </cm:default-properties>
   </cm:property-placeholder>
 
+  <cm:property-placeholder persistent-id="websockets">
+    <cm:default-properties>
+      <cm:property name="maximum-fragment-length" value="8192"/>
+      <cm:property name="idle-timeout" value="30000"/>
+      <cm:property name="heartbeat-interval" value="5000"/>
+      <cm:property name="ping-executor-name-prefix" value="web-socket-ping-executor"/>
+      <cm:property name="max-thread-count" value="1"/>
+    </cm:default-properties>
+  </cm:property-placeholder>
+
   <reference id="dOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
           ext:filter="(type=@{databroker-service-type})"/>
 
+  <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="webSocketConfiguration"
+        class="org.opendaylight.restconf.nb.rfc8040.streams.websockets.WebSocketConfiguration">
+    <argument value="${maximum-fragment-length}"/>
+    <argument value="${idle-timeout}"/>
+    <argument value="${heartbeat-interval}"/>
+  </bean>
+
   <bean id="servicesWrapper" factory-ref="rfc8040RestConfWiring" factory-method="getServicesWrapper" />
 
   <service ref="jSONRestconfServiceRfc8040Impl" odl:type="rfc8040"