INT-706 moved config files to the same directory as the corresponding demo classes and added descriptions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,6 +19,12 @@ package org.springframework.integration.samples.oddeven;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
/**
|
||||
* Demonstrates a method-invoking inbound Channel Adapter with a
|
||||
* Cron-based polling trigger followed by a simple method-invoking
|
||||
* router.
|
||||
* <p>
|
||||
* See the 'cronOddEvenDemo.xml' configuration file for more detail.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class CronOddEvenDemo {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,6 +19,12 @@ package org.springframework.integration.samples.oddeven;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
/**
|
||||
* Demonstrates a method-invoking inbound Channel Adapter with an
|
||||
* Interval-based polling trigger followed by a simple method-invoking
|
||||
* router.
|
||||
* <p>
|
||||
* See the 'intervalOddEvenDemo.xml' configuration file for more detail.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class IntervalOddEvenDemo {
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd">
|
||||
|
||||
<annotation-config/>
|
||||
|
||||
<channel id="even"/>
|
||||
<channel id="odd"/>
|
||||
|
||||
<inbound-channel-adapter id="numbers" ref="counter" method="next">
|
||||
<poller max-messages-per-poll="1">
|
||||
<cron-trigger expression="1,2,3,5,8,13,21,34,55 * * * * ?"/>
|
||||
</poller>
|
||||
</inbound-channel-adapter>
|
||||
|
||||
<router ref="parityResolver" method="getParity" input-channel="numbers"/>
|
||||
|
||||
<service-activator ref="oddLogger" input-channel="odd"/>
|
||||
|
||||
<service-activator ref="evenLogger" input-channel="even"/>
|
||||
|
||||
<beans:bean id="counter" class="org.springframework.integration.samples.oddeven.Counter"/>
|
||||
|
||||
<beans:bean id="parityResolver" class="org.springframework.integration.samples.oddeven.ParityResolver"/>
|
||||
|
||||
<beans:bean id="oddLogger" class="org.springframework.integration.samples.oddeven.OddLogger"/>
|
||||
|
||||
<beans:bean id="evenLogger" class="org.springframework.integration.samples.oddeven.EvenLogger"/>
|
||||
|
||||
</beans:beans>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd">
|
||||
|
||||
<annotation-config/>
|
||||
|
||||
<channel id="even"/>
|
||||
<channel id="odd"/>
|
||||
|
||||
<inbound-channel-adapter id="numbers" ref="counter" method="next">
|
||||
<poller max-messages-per-poll="1">
|
||||
<interval-trigger interval="3" time-unit="SECONDS"/>
|
||||
</poller>
|
||||
</inbound-channel-adapter>
|
||||
|
||||
<router ref="parityResolver" method="getParity" input-channel="numbers"/>
|
||||
|
||||
<service-activator ref="oddLogger" input-channel="odd"/>
|
||||
|
||||
<service-activator ref="evenLogger" input-channel="even"/>
|
||||
|
||||
<beans:bean id="counter" class="org.springframework.integration.samples.oddeven.Counter"/>
|
||||
|
||||
<beans:bean id="parityResolver" class="org.springframework.integration.samples.oddeven.ParityResolver"/>
|
||||
|
||||
<beans:bean id="oddLogger" class="org.springframework.integration.samples.oddeven.OddLogger"/>
|
||||
|
||||
<beans:bean id="evenLogger" class="org.springframework.integration.samples.oddeven.EvenLogger"/>
|
||||
|
||||
</beans:beans>
|
||||
Reference in New Issue
Block a user