awips2/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml
2017-10-24 09:31:12 -06:00

379 lines
22 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="gfeSiteActivation" class="com.raytheon.edex.plugin.gfe.config.GFESiteActivation"
depends-on="commonTimeRegistered, gfeDbRegistered, levelFactoryInitialized">
<constructor-arg ref="iscProvider" />
</bean>
<bean id="gfeSitesActiveRequest" factory-bean="siteAwareRegistry" factory-method="register"
depends-on="gfeActivationAsyncRequest">
<constructor-arg ref="gfeSiteActivation"/>
</bean>
<bean id="gfeActivationAsyncRequest" factory-bean="contextManager" factory-method="registerAsyncStartupBean">
<constructor-arg ref="gfeSiteActivation"/>
</bean>
<bean id="commitGridsHandler" class="com.raytheon.edex.plugin.gfe.server.handler.CommitGridsHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.CommitGridsRequest"/>
<constructor-arg ref="commitGridsHandler"/>
</bean>
<bean id="activeTableHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetActiveTableHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetActiveTableRequest"/>
<constructor-arg ref="activeTableHandler"/>
</bean>
<bean id="GetASCIIGridsHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetASCIIGridsHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetASCIIGridsRequest"/>
<constructor-arg ref="GetASCIIGridsHandler"/>
</bean>
<bean id="SaveASCIIGridsHandler" class="com.raytheon.edex.plugin.gfe.server.handler.SaveASCIIGridsHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.SaveASCIIGridsRequest"/>
<constructor-arg ref="SaveASCIIGridsHandler"/>
</bean>
<bean id="brokerConnectionsProvider" class="com.raytheon.uf.edex.esb.camel.jms.QpidBrokerConnectionsImpl"/>
<bean id="clientsHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetClientsHandler">
<constructor-arg ref="brokerConnectionsProvider"/>
</bean>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetClientsRequest"/>
<constructor-arg ref="clientsHandler"/>
</bean>
<bean id="dbInventoryHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetDbInventoryHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetDbInventoryRequest"/>
<constructor-arg ref="dbInventoryHandler"/>
</bean>
<bean id="executeIscMosaicHandler" class="com.raytheon.edex.plugin.gfe.server.handler.ExecuteIscMosaicRequestHandler">
<constructor-arg ref="iscMosaicPythonThreadPool"/>
</bean>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.ExecuteIscMosaicRequest"/>
<constructor-arg ref="executeIscMosaicHandler"/>
</bean>
<bean id="discreteDefinitionHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetDiscreteDefinitionHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetDiscreteDefinitionRequest"/>
<constructor-arg ref="discreteDefinitionHandler"/>
</bean>
<bean id="gridDataHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetGridDataHandler">
<property name="byteLimitInMB" value="${edex.requestsrv.byteLimitInMB}" />
</bean>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetGridDataRequest"/>
<constructor-arg ref="gridDataHandler"/>
</bean>
<bean id="gridInventoryHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetGridInventoryHandler"/>
<bean id="getGridInventoryRequestRegister" factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetGridInventoryRequest"/>
<constructor-arg ref="gridInventoryHandler"/>
</bean>
<bean id="gridHistoryHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetGridHistoryHandler"/>
<bean id="getGridHistoryRequestRegister" factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetGridHistoryRequest"/>
<constructor-arg ref="gridHistoryHandler"/>
</bean>
<bean id="gridParmInfoHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetGridParmInfoHandler"/>
<bean id="getGridParmInfoRequestRegister" factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetGridParmInfoRequest"/>
<constructor-arg ref="gridParmInfoHandler"/>
</bean>
<bean id="knownOfficeTypesHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetKnownOfficeTypesHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetKnownOfficeTypesRequest"/>
<constructor-arg ref="knownOfficeTypesHandler"/>
</bean>
<bean id="knownSitesHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetKnownSitesHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetKnownSitesRequest"/>
<constructor-arg ref="knownSitesHandler"/>
</bean>
<bean id="lockTablesHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetLockTablesHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetLockTablesRequest"/>
<constructor-arg ref="lockTablesHandler"/>
</bean>
<bean id="netCDFHandler" class="com.raytheon.edex.plugin.gfe.server.handler.ExecuteIfpNetCDFGridRequestHandler">
<constructor-arg ref="ifpnetCDFPythonThreadPool"/>
</bean>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.ExecuteIfpNetCDFGridRequest"/>
<constructor-arg ref="netCDFHandler"/>
</bean>
<bean id="purgeGfeGridsHandler" class="com.raytheon.edex.plugin.gfe.server.handler.PurgeGfeGridsRequestHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.PurgeGfeGridsRequest"/>
<constructor-arg ref="purgeGfeGridsHandler"/>
</bean>
<bean id="officeTypeHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetOfficeTypeHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetOfficeTypeRequest"/>
<constructor-arg ref="officeTypeHandler"/>
</bean>
<bean id="officialDbNameHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetOfficialDbNameHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetOfficialDbNameRequest"/>
<constructor-arg ref="officialDbNameHandler"/>
</bean>
<bean id="parmListHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetParmListHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetParmListRequest"/>
<constructor-arg ref="parmListHandler"/>
</bean>
<bean id="gfePointHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetPointDataHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetPointDataRequest"/>
<constructor-arg ref="gfePointHandler"/>
</bean>
<bean id="wxDefinitionHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetWXDefinitionHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetWXDefinitionRequest"/>
<constructor-arg ref="wxDefinitionHandler"/>
</bean>
<bean id="gridLocHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GridLocHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GridLocRequest"/>
<constructor-arg ref="gridLocHandler"/>
</bean>
<bean id="iscCreateDomainDictHandler" class="com.raytheon.edex.plugin.gfe.server.handler.IscCreateDomainDictHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.IscCreateDomainDictRequest"/>
<constructor-arg ref="iscCreateDomainDictHandler"/>
</bean>
<bean id="iscDataRecHandler" class="com.raytheon.edex.plugin.gfe.server.handler.IscDataRecRequestHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.IscDataRecRequest"/>
<constructor-arg ref="iscDataRecHandler"/>
</bean>
<bean id="iscGetRequestXmlHandler" class="com.raytheon.edex.plugin.gfe.server.handler.IscGetRequestXmlHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.IscGetRequestXmlRequest"/>
<constructor-arg ref="iscGetRequestXmlHandler"/>
</bean>
<bean id="iscMakeRequestHandler" class="com.raytheon.edex.plugin.gfe.server.handler.IscMakeRequestHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.IscMakeRequest"/>
<constructor-arg ref="iscMakeRequestHandler"/>
</bean>
<bean id="iscRequestQueryHandler" class="com.raytheon.edex.plugin.gfe.server.handler.IscRequestQueryHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.IscRequestQueryRequest"/>
<constructor-arg ref="iscRequestQueryHandler"/>
</bean>
<bean id="lockChangeHandler" class="com.raytheon.edex.plugin.gfe.server.handler.LockChangeHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.LockChangeRequest"/>
<constructor-arg ref="lockChangeHandler"/>
</bean>
<bean id="saveGfeGridHandler" class="com.raytheon.edex.plugin.gfe.server.handler.SaveGfeGridHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.SaveGfeGridRequest"/>
<constructor-arg ref="saveGfeGridHandler"/>
</bean>
<bean id="singletonDbIdsHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetSingletonDbIdsRequestHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetSingletonDbIdsRequest"/>
<constructor-arg ref="singletonDbIdsHandler"/>
</bean>
<bean id="siteTimeZoneHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetSiteTimeZoneInfoRequestHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetSiteTimeZoneInfoRequest"/>
<constructor-arg ref="siteTimeZoneHandler"/>
</bean>
<bean id="smartInitHandler" class="com.raytheon.edex.plugin.gfe.server.handler.SmartInitRequestHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.SmartInitRequest"/>
<constructor-arg ref="smartInitHandler"/>
</bean>
<bean id="configureTextProductsHandler" class="com.raytheon.edex.plugin.gfe.textproducts.ConfigureTextProductsHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.ConfigureTextProductsRequest"/>
<constructor-arg ref="configureTextProductsHandler"/>
</bean>
<bean id="GetSelectTRHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetSelectTimeRangeHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetSelectTimeRangeRequest"/>
<constructor-arg ref="GetSelectTRHandler"/>
</bean>
<bean id="createNewDbHandler" class="com.raytheon.edex.plugin.gfe.server.handler.CreateNewDbHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.CreateNewDbRequest"/>
<constructor-arg ref="createNewDbHandler"/>
</bean>
<bean id="getLatestDbInsertTimeHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetLatestDbTimeHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetLatestDbTimeRequest"/>
<constructor-arg ref="getLatestDbInsertTimeHandler"/>
</bean>
<bean id="getLatestDbIdHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetLatestModelDbIdHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetLatestModelDbIdRequest"/>
<constructor-arg ref="getLatestDbIdHandler"/>
</bean>
<bean id="getTopoDataHandler" class="com.raytheon.edex.plugin.gfe.server.handler.GetTopoDataHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.GetTopoDataRequest"/>
<constructor-arg ref="getTopoDataHandler"/>
</bean>
<bean id="rsyncGridsToCWFHandler" class="com.raytheon.edex.plugin.gfe.server.handler.RsyncGridsToCWFHandler"/>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.gfe.request.RsyncGridsToCWFRequest"/>
<constructor-arg ref="rsyncGridsToCWFHandler"/>
</bean>
<bean id="ClearGfeOrphanedLocks" class="com.raytheon.edex.plugin.gfe.server.lock.ClearGfeOrphanedLocks">
<property name="provider" ref="brokerConnectionsProvider" />
</bean>
<bean id="ifpnetCDFFactory" class="com.raytheon.edex.plugin.gfe.isc.IscScriptFactory">
<constructor-arg value="ifpnetCDF"/>
</bean>
<bean id="ifpnetCDFPythonThreadPool" class="com.raytheon.uf.common.python.concurrent.PythonJobCoordinator">
<constructor-arg value="2" />
<constructor-arg value="ifpnetCDF" />
<constructor-arg ref="ifpnetCDFFactory"/>
</bean>
<bean id="iscMosaicFactory" class="com.raytheon.edex.plugin.gfe.isc.IscScriptFactory">
<constructor-arg value="iscMosaic"/>
</bean>
<bean id="iscMosaicPythonThreadPool" class="com.raytheon.uf.common.python.concurrent.PythonJobCoordinator">
<constructor-arg value="2" />
<constructor-arg value="iscMosaic" />
<constructor-arg ref="iscMosaicFactory" />
</bean>
<bean id="iscDataRecFactory" class="com.raytheon.edex.plugin.gfe.isc.IscScriptFactory">
<constructor-arg value="iscDataRec"/>
</bean>
<bean id="iscDataRecPythonThreadPool" class="com.raytheon.uf.common.python.concurrent.PythonJobCoordinator">
<constructor-arg value="2" />
<constructor-arg value="iscDataRec" />
<constructor-arg ref="iscDataRecFactory" />
</bean>
<!-- End Additional ISC Beans -->
<bean id="logPurger" class="com.raytheon.edex.plugin.gfe.log.LogPurger"/>
<bean id="productIscPurger" class="com.raytheon.uf.common.dataplugin.gfe.util.FilePurger">
<constructor-arg value="/awips2/GFESuite/products/ISC"/> <!-- directory to be purged -->
<constructor-arg value="2419200000"/> <!-- purge age: 28 days in milliseconds -->
</bean>
<bean id="productAtblPurger" class="com.raytheon.uf.common.dataplugin.gfe.util.FilePurger">
<constructor-arg value="/awips2/GFESuite/products/ATBL"/> <!-- directory to be purged -->
<constructor-arg value="2419200000"/> <!-- purge age: 28 days in milliseconds -->
</bean>
<camelContext id="gfe-request-camel" xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler">
<endpoint id="exportDigitalDataCron" uri="clusteredquartz://gfe/exportDigitalData/?cron=${gfe.cron}"/>
<endpoint id="gfeLogPurgeCron" uri="clusteredquartz://gfe/purgeGfeLogs/?cron=${purge.gfe.logs.cron}"/>
<endpoint id="gfeProductIscPurgeCron" uri="clusteredquartz://gfe/purgeGfeProductsIsc/?cron=${purge.gfe.products.isc.cron}"/>
<endpoint id="gfeProductAtblPurgeCron" uri="clusteredquartz://gfe/purgeGfeProductsAtbl/?cron=${purge.gfe.products.atbl.cron}"/>
<endpoint id="gfeClearOrphanedLocksCron" uri="clusteredquartz://gfe/clearGfeOrhpanedLocks/?cron=${clear.gfe.orphaned.locks.cron}"/>
<route id="exportDigitalData">
<from uri="exportDigitalDataCron"/>
<to uri="jms-generic:queue:exportDigitalDataWork"/>
</route>
<route id="purgeGfeLogs">
<from uri="gfeLogPurgeCron"/>
<to uri="jms-generic:queue:purgeGfeLogWork"/>
</route>
<route id="purgeGfeLogWork">
<from uri="jms-generic:queue:purgeGfeLogWork"/>
<doTry>
<bean ref="logPurger" method="purge"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:svcBackup?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="purgeGfeProductsIsc">
<from uri="gfeProductIscPurgeCron"/>
<to uri="jms-generic:queue:purgeGfeProductIscWork"/>
</route>
<route id="purgeGfeProductIscWork">
<from uri="jms-generic:queue:purgeGfeProductIscWork"/>
<doTry>
<bean ref="productIscPurger" method="purge"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:svcBackup?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="purgeGfeProductsAtbl">
<from uri="gfeProductAtblPurgeCron"/>
<to uri="jms-generic:queue:purgeGfeProductAtblWork"/>
</route>
<route id="purgeGfeProductAtblWork">
<from uri="jms-generic:queue:purgeGfeProductAtblWork"/>
<doTry>
<bean ref="productAtblPurger" method="purge"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:svcBackup?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="clearGfeOrphanedLocks">
<from uri="gfeClearOrphanedLocksCron"/>
<to uri="jms-generic:queue:clearOrphanedLocksWork"/>
</route>
<route id="clearOrphanedLocksWork">
<from uri="jms-generic:queue:clearOrphanedLocksWork"/>
<doTry>
<bean ref="ClearGfeOrphanedLocks" method="clearLocksCron"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:svcBackup?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
<!-- ISC Services Beans -->
<bean id="iscProvider" class="com.raytheon.edex.plugin.gfe.isc.IscServiceProvider" />
<bean id="fetchATSrv" class="com.raytheon.edex.plugin.gfe.isc.FetchActiveTableSrv" />
<bean factory-bean="iscProvider" factory-method="addISCService">
<constructor-arg ref="fetchATSrv"/>
</bean>
<bean id="requestTCVSrv" class="com.raytheon.edex.plugin.gfe.isc.RequestTCVSrv" />
<bean factory-bean="iscProvider" factory-method="addISCService">
<constructor-arg ref="requestTCVSrv"/>
</bean>
<bean factory-bean="contextManager" factory-method="registerContextStateProcessor">
<constructor-arg ref="clusteredIscBeans" />
<constructor-arg ref="iscProvider" />
</bean>
<camelContext id="clusteredIscBeans" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<route id="activateISC">
<from uri="timer://activateISCServices?repeatCount=1"/>
<bean ref="iscProvider" method="activateInstance"/>
</route>
</camelContext>
<bean factory-bean="contextManager" factory-method="registerClusteredContext">
<constructor-arg ref="clusteredIscBeans"/>
</bean>
</beans>