awips2/edexOsgi/com.raytheon.edex.plugin.binlightning/res/spring/binlightning_ep-ingest.xml
2017-04-21 18:33:55 -06:00

54 lines
No EOL
2.2 KiB
XML

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="binlightningDecoder"
class="com.raytheon.edex.plugin.binlightning.BinLightningDecoder" />
<bean id="totalLightningDecoder" class="com.raytheon.edex.plugin.binlightning.total.TotalLightningDecoder" />
<bean id="binlightningDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="binlightning" />
<constructor-arg value="jms-durable:queue:Ingest.binlightning" />
</bean>
<bean factory-bean="contextManager" factory-method="registerClusteredContext">
<constructor-arg ref="clusteredBinLightningRoutes" />
</bean>
<camelContext id="clusteredBinLightningRoutes" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<!-- Begin binlightning routes -->
<route id="binlightningIngestRoute">
<from uri="jms-durable:queue:Ingest.binlightning" />
<setHeader headerName="pluginName">
<constant>binlightning</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<choice>
<when>
<simple>${in.header.header} regex '^SFPA42 KWBC.*'</simple>
<bean ref="totalLightningDecoder" method="decode" />
</when>
<otherwise>
<bean ref="binlightningDecoder" method="decode" />
</otherwise>
</choice>
<to uri="direct-vm:persistIndexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:binlightning?level=ERROR" />
</doCatch>
</doTry>
<!-- bean ref="processUtil" method="delete" / -->
</route>
</camelContext>
</beans>