Refactored to use inheritance and separate logic where possible. Addressed comments. Change-Id: I9e62414cd83121575bdf99a3b47466a7585bedb6 Former-commit-id:17196b5dcd
[formerly 6e015b3f61c20635077d6e8271e9b763e5a32fe1] Former-commit-id:dbba727f3d
64 lines
No EOL
2.5 KiB
XML
64 lines
No EOL
2.5 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="airmetDecoder" class="gov.noaa.nws.ncep.edex.plugin.airmet.decoder.AirmetDecoder">
|
|
<constructor-arg ref="airmetPluginName"/>
|
|
</bean>
|
|
<bean id="airmetSeparator" class="gov.noaa.nws.ncep.edex.plugin.airmet.decoder.AirmetSeparator"/>
|
|
|
|
<bean id="airmetDistRegistry" factory-bean="distributionSrv"
|
|
factory-method="register">
|
|
<constructor-arg value="airmet" />
|
|
<constructor-arg value="jms-durable:queue:Ingest.airmet" />
|
|
</bean>
|
|
|
|
<camelContext id="airmet-camel"
|
|
xmlns="http://camel.apache.org/schema/spring"
|
|
errorHandlerRef="errorHandler">
|
|
<!--
|
|
<endpoint id="airmetFileEndpoint" uri="file:${edex.home}/data/sbn/airmet?noop=true&idempotent=false"/>
|
|
|
|
<route id="airmetFileConsumerRoute">
|
|
<from ref="airmetFileEndpoint"/>
|
|
<bean ref="fileToString" />
|
|
<setHeader headerName="pluginName">
|
|
<constant>airmet</constant>
|
|
</setHeader>
|
|
<to uri="jms-durable:queue:Ingest.airmet"/>
|
|
</route>
|
|
-->
|
|
|
|
<!-- Begin Airmet routes -->
|
|
<route id="airmetIngestRoute">
|
|
<from uri="jms-durable:queue:Ingest.airmet"/>
|
|
<setHeader headerName="pluginName">
|
|
<constant>airmet</constant>
|
|
</setHeader>
|
|
<doTry>
|
|
<pipeline>
|
|
<bean ref="stringToFile" />
|
|
<split streaming="true">
|
|
<method bean="airmetSeparator" method="separate"/>
|
|
<doTry>
|
|
<pipeline>
|
|
<bean ref="airmetDecoder" method="decode"/>
|
|
<to uri="direct-vm:indexAlert"/>
|
|
</pipeline>
|
|
<doCatch>
|
|
<exception>java.lang.Throwable</exception>
|
|
<to uri="log:airmet?level=ERROR"/>
|
|
</doCatch>
|
|
</doTry>
|
|
</split>
|
|
</pipeline>
|
|
<doCatch>
|
|
<exception>java.lang.Throwable</exception>
|
|
<to uri="log:airmet?level=ERROR"/>
|
|
</doCatch>
|
|
</doTry>
|
|
</route>
|
|
</camelContext>
|
|
</beans> |