Issue #1647 Configure NCF and WFO retrieval tasks
Change-Id: I038a8c297587982b98ca419311b4e38894947ed4 Former-commit-id:bf9eefe961
[formerly 14c1f2d908f4cba6353251fa87062f6f8722c7e9] Former-commit-id:de7f387248
This commit is contained in:
parent
af245e134e
commit
527ed01fec
7 changed files with 169 additions and 114 deletions
|
@ -32,14 +32,6 @@
|
|||
<!-- The strategy for how to create the bandwidth manager -->
|
||||
<constructor-arg ref="bandwidthManagerCreator" />
|
||||
</bean>
|
||||
|
||||
<util:map id="retrievalAgents">
|
||||
<entry key="Retrievals-1" value-ref="subscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-2" value-ref="subscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-3" value-ref="subscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-4" value-ref="subscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-5" value-ref="subscriptionRetrievalAgentPrototype" />
|
||||
</util:map>
|
||||
|
||||
<camelContext id="BandwidthManager-context"
|
||||
xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler">
|
||||
|
|
|
@ -6,4 +6,24 @@
|
|||
<bean id="bandwidthManagerCreator"
|
||||
class="com.raytheon.uf.edex.datadelivery.bandwidth.NcfBandwidthManagerCreator" />
|
||||
|
||||
<bean id="sbnSubscriptionRetrievalAgentPrototype"
|
||||
class="com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.SubscriptionRetrievalAgent"
|
||||
scope="prototype">
|
||||
<constructor-arg value="SBN" />
|
||||
<constructor-arg value="notifyRetrieval" />
|
||||
<constructor-arg ref="retrievalAgentNotifier" />
|
||||
<constructor-arg value="${bandwidth.default.retrieval.priority}" />
|
||||
<constructor-arg ref="retrievalManager" />
|
||||
<constructor-arg ref="bandwidthDao" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
|
||||
<util:map id="retrievalAgents">
|
||||
<entry key="Retrievals-1" value-ref="sbnSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-2" value-ref="sbnSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-3" value-ref="sbnSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-4" value-ref="sbnSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-5" value-ref="sbnSubscriptionRetrievalAgentPrototype" />
|
||||
</util:map>
|
||||
|
||||
</beans>
|
|
@ -6,4 +6,41 @@
|
|||
<bean id="bandwidthManagerCreator"
|
||||
class="com.raytheon.uf.edex.datadelivery.bandwidth.WfoBandwidthManagerCreator" />
|
||||
|
||||
<bean id="opsnetSubscriptionRetrievalAgentPrototype"
|
||||
class="com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.SubscriptionRetrievalAgent"
|
||||
scope="prototype">
|
||||
<constructor-arg value="OPSNET" />
|
||||
<constructor-arg value="notifyRetrieval" />
|
||||
<constructor-arg ref="retrievalAgentNotifier" />
|
||||
<constructor-arg value="${bandwidth.default.retrieval.priority}" />
|
||||
<constructor-arg ref="retrievalManager" />
|
||||
<constructor-arg ref="bandwidthDao" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
|
||||
<bean id="sbnSubscriptionRetrievalAgentPrototype"
|
||||
class="com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.SubscriptionRetrievalAgent"
|
||||
scope="prototype">
|
||||
<constructor-arg value="SBN" />
|
||||
<constructor-arg value="notifyRetrieval" />
|
||||
<constructor-arg ref="retrievalAgentNotifier" />
|
||||
<constructor-arg value="${bandwidth.default.retrieval.priority}" />
|
||||
<constructor-arg ref="retrievalManager" />
|
||||
<constructor-arg ref="bandwidthDao" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
|
||||
<util:map id="retrievalAgents">
|
||||
<entry key="Retrievals-1" value-ref="opsnetSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-2" value-ref="opsnetSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-3" value-ref="opsnetSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-4" value-ref="opsnetSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-5" value-ref="opsnetSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-6" value-ref="sbnSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-7" value-ref="sbnSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-8" value-ref="sbnSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-9" value-ref="sbnSubscriptionRetrievalAgentPrototype" />
|
||||
<entry key="Retrievals-10" value-ref="sbnSubscriptionRetrievalAgentPrototype" />
|
||||
</util:map>
|
||||
|
||||
</beans>
|
|
@ -85,18 +85,6 @@
|
|||
its Agents -->
|
||||
<bean id="retrievalAgentNotifier" class="java.lang.Object" />
|
||||
|
||||
<bean id="subscriptionRetrievalAgentPrototype"
|
||||
class="com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.SubscriptionRetrievalAgent"
|
||||
scope="prototype">
|
||||
<constructor-arg value="OPSNET" />
|
||||
<constructor-arg value="notifyRetrieval" />
|
||||
<constructor-arg ref="retrievalAgentNotifier" />
|
||||
<constructor-arg value="${bandwidth.default.retrieval.priority}" />
|
||||
<constructor-arg ref="retrievalManager" />
|
||||
<constructor-arg ref="bandwidthDao" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
|
||||
<bean id="retrievalAgentManager"
|
||||
class="com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalAgentManager"
|
||||
init-method="start">
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
|
||||
|
||||
<!-- A RetrievalTask takes three constructor arguments:
|
||||
1) How to find retrievals, in this case perform the actual retrieval and return it
|
||||
2) What to do with found retrievals, in this case process it and send a notification event
|
||||
3) How to complete retrievals, in this case update the database and send a notification event
|
||||
-->
|
||||
<bean id="sbnRetrievalTask"
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalTask">
|
||||
<constructor-arg value="SBN" />
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.PerformRetrievalsThenReturnFinder">
|
||||
<constructor-arg value="SBN" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.SerializeRetrievedDataToDirectory">
|
||||
<constructor-arg value="/awips2/crawl" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<util:constant
|
||||
static-field="com.raytheon.uf.edex.datadelivery.retrieval.handlers.IRetrievalResponseCompleter.NULL" />
|
||||
</constructor-arg>
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
|
||||
<util:list id="retrievalTaskList"
|
||||
value-type="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalTask.RetrievalTask">
|
||||
<ref bean="sbnRetrievalTask" />
|
||||
</util:list>
|
||||
|
||||
</beans>
|
|
@ -0,0 +1,71 @@
|
|||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
|
||||
|
||||
<!-- A RetrievalTask takes three constructor arguments:
|
||||
1) How to find retrievals, in this case perform the actual retrieval and return it
|
||||
2) What to do with found retrievals, in this case process it and send a notification event
|
||||
3) How to complete retrievals, in this case update the database and send a notification event
|
||||
-->
|
||||
<bean id="opsnetRetrievalTask"
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalTask">
|
||||
<constructor-arg value="OPSNET" />
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.PerformRetrievalsThenReturnFinder">
|
||||
<constructor-arg value="OPSNET" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.StoreRetrievedData">
|
||||
<constructor-arg value="directvm:dataDeliveryNotify" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalResponseCompleter">
|
||||
<constructor-arg ref="subNotifyTask" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
|
||||
<!-- Pick up SBN retrievals from the drop-off directory -->
|
||||
<bean id="sbnRetrievalTask"
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalTask">
|
||||
<constructor-arg value="SBN" />
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.DeserializeRetrievedDataFromDirectory">
|
||||
<constructor-arg value="/awips2/crawl" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.StoreRetrievedData">
|
||||
<constructor-arg value="directvm:dataDeliveryNotify" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalResponseCompleter">
|
||||
<constructor-arg ref="subNotifyTask" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
|
||||
<util:list id="retrievalTaskList"
|
||||
value-type="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalTask.RetrievalTask">
|
||||
<ref bean="opsnetRetrievalTask" />
|
||||
<ref bean="sbnRetrievalTask" />
|
||||
</util:list>
|
||||
|
||||
</beans>
|
|
@ -10,6 +10,7 @@
|
|||
value="com.raytheon.uf.edex.datadelivery.retrieval" />
|
||||
<property name="database" value="metadata" />
|
||||
</bean>
|
||||
|
||||
<bean factory-bean="dbPluginRegistry" factory-method="register">
|
||||
<constructor-arg value="com.raytheon.uf.edex.datadelivery.retrieval" />
|
||||
<constructor-arg ref="ddRetrievalDatabaseProperties" />
|
||||
|
@ -20,93 +21,6 @@
|
|||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
|
||||
<!-- A RetrievalTask takes three constructor arguments:
|
||||
1) How to find retrievals, in this case perform the actual retrieval and return it
|
||||
2) What to do with found retrievals, in this case process it and send a notification event
|
||||
3) How to complete retrievals, in this case update the database and send a notification event
|
||||
-->
|
||||
<bean id="opsnetRetrievalTask"
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalTask">
|
||||
<constructor-arg value="OPSNET" />
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.PerformRetrievalsThenReturnFinder">
|
||||
<constructor-arg value="OPSNET" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.StoreRetrievedData">
|
||||
<constructor-arg value="directvm:dataDeliveryNotify" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalResponseCompleter">
|
||||
<constructor-arg ref="subNotifyTask" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
Comment out version above and uncomment this version to test out basic SBN directory drop-off and
|
||||
pickup from a directory
|
||||
-->
|
||||
<!--
|
||||
<bean id="opsnetRetrievalTask"
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalTask">
|
||||
<constructor-arg value="OPSNET" />
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.PerformRetrievalsThenReturnFinder">
|
||||
<constructor-arg value="OPSNET" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.SerializeRetrievedDataToDirectory">
|
||||
<constructor-arg value="/awips2/crawl" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<util:constant
|
||||
static-field="com.raytheon.uf.edex.datadelivery.retrieval.handlers.IRetrievalResponseCompleter.NULL" />
|
||||
</constructor-arg>
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<bean id="sbnRetrievalTask"
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalTask">
|
||||
<constructor-arg value="SBN" />
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.DeserializeRetrievedDataFromDirectory">
|
||||
<constructor-arg value="/awips2/crawl" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.StoreRetrievedData">
|
||||
<constructor-arg value="directvm:dataDeliveryNotify" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<bean
|
||||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalResponseCompleter">
|
||||
<constructor-arg ref="subNotifyTask" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
</constructor-arg>
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
</bean>
|
||||
|
||||
<bean id="scheduledExecutorService" class="java.util.concurrent.Executors"
|
||||
factory-method="newScheduledThreadPool">
|
||||
<constructor-arg value="3" />
|
||||
|
@ -116,13 +30,7 @@
|
|||
class="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalHandler">
|
||||
<constructor-arg ref="scheduledExecutorService" />
|
||||
<constructor-arg ref="retrievalDao" />
|
||||
<constructor-arg>
|
||||
<util:list
|
||||
value-type="com.raytheon.uf.edex.datadelivery.retrieval.handlers.RetrievalTask.RetrievalTask">
|
||||
<ref bean="opsnetRetrievalTask" />
|
||||
<ref bean="sbnRetrievalTask" />
|
||||
</util:list>
|
||||
</constructor-arg>
|
||||
<constructor-arg ref="retrievalTaskList" />
|
||||
<constructor-arg ref="subNotifyTask" />
|
||||
</bean>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue