awips2/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/res/spring/bandwidth-datadelivery.xml
Dave Hladky 5fa53b22dc Issue #2992 Updated DD list of active registries
Change-Id: Iaef7dc76442d1e101cf9865a542a777afe1722ca

Former-commit-id: a14cb8c45f [formerly e2a4bb6755] [formerly c352643c79] [formerly a14cb8c45f [formerly e2a4bb6755] [formerly c352643c79] [formerly 3b00ae03cc [formerly c352643c79 [formerly a34955102d1316135c4151210daba0e5807ff6c9]]]]
Former-commit-id: 3b00ae03cc
Former-commit-id: 5fc17cf3b8 [formerly ea791b5ca5] [formerly 271120a82cffba35438f0b9830c3a47c736fcb73 [formerly bf42c8d740]]
Former-commit-id: 966b34bc10a6cb76f151b577b0acae7fb953d804 [formerly 5b11e45636]
Former-commit-id: a06db5a4e7
2014-04-30 17:38:28 -05:00

107 lines
4.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="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:/com.raytheon.uf.edex.datadelivery.bandwidth.properties</value>
</list>
</property>
</bean>
<bean id="bandwidthDao" factory-bean="bandwidthContextFactory"
factory-method="getBandwidthDao" />
<bean id="bandwidthBucketDao" factory-bean="bandwidthContextFactory"
factory-method="getBandwidthBucketDao" />
<!-- TODO: Move the associations between a bucket and its allocations
into the database -->
<bean id="bandwidthBucketAllocationAssociator"
class="com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.InMemoryBandwidthBucketAllocationAssociator">
<constructor-arg ref="bandwidthDao" />
<constructor-arg ref="bandwidthBucketDao" />
</bean>
<bean id="bandwidthDbInit" factory-bean="bandwidthContextFactory"
factory-method="getBandwidthDbInit" />
<bean id="bandwidthMapConfigFile" factory-bean="bandwidthContextFactory"
factory-method="getBandwidthMapConfigFile" />
<bean id="bandwidthManager" factory-bean="bandwidthContextFactory"
factory-method="getBandwidthManager" depends-on="bandwidthUtil"
init-method="init">
<constructor-arg ref="bandwidthDbInit" />
<constructor-arg ref="bandwidthDao" />
<constructor-arg ref="retrievalManager" />
<constructor-arg ref="bandwidthDaoUtil" />
<constructor-arg ref="registryIdUtil" />
<property name="aggregator" ref="aggregator" />
<property name="initializer" ref="bandwidthInitializer" />
</bean>
<bean id="bandwidthUtil"
class="com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil"
factory-method="getInstance" depends-on="registerDataDeliveryHandlers">
<property name="subscriptionLatencyCalculator">
<bean
class="com.raytheon.uf.edex.datadelivery.bandwidth.util.SubscriptionValueLatencyCalculator" />
</property>
<property name="subscriptionRescheduleStrategy">
<bean
class="com.raytheon.uf.edex.datadelivery.bandwidth.util.AlwaysRescheduleSubscriptions" />
</property>
</bean>
<bean id="bandwidthDaoUtil"
class="com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil">
<constructor-arg ref="bandwidthDao" />
<constructor-arg ref="retrievalManager" />
</bean>
<bean id="BandwidthMap"
class="com.raytheon.uf.common.datadelivery.bandwidth.data.BandwidthMap"
factory-method="load">
<constructor-arg ref="bandwidthMapConfigFile" />
</bean>
<bean id="aggregator"
class="com.raytheon.uf.edex.datadelivery.bandwidth.processing.SimpleSubscriptionAggregator">
<constructor-arg ref="bandwidthDao" />
</bean>
<!-- The shared monitor object between the RetrievalAgentManager and
its Agents -->
<bean id="retrievalAgentNotifier" class="java.lang.Object" />
<bean id="retrievalManager"
class="com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager">
<constructor-arg ref="bandwidthDao" />
<constructor-arg ref="retrievalAgentNotifier" />
<property name="retrievalPlans" ref="retrievalPlans" />
</bean>
<bean id="registryBandwidthUtilizationListener"
class="com.raytheon.uf.edex.datadelivery.bandwidth.registry.RegistryBandwidthUtilizationListener"
depends-on="ebxmlRegistryWebServer, BandwidthMap, bandwidthBucketDao">
<constructor-arg ref="ebxmlRegistryWebServer"/>
<constructor-arg ref="ebxmlFederationEnabled"/>
<constructor-arg ref="BandwidthMap"/>
<constructor-arg ref="bandwidthBucketDao"/>
</bean>
<camelContext id="datadelivery-bandwidth" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<endpoint id="scheduleBandwidthQueue"
uri="vm://scheduleBandwidth" />
<route id="scheduleSubscription">
<from uri="scheduleBandwidthQueue" />
<bean ref="bandwidthManager" method="schedule"/>
</route>
</camelContext>
</beans>