IN PROGRESS - issue INT-574: Chain element should support aggregators mid chain as well as handlers extending AbstractReplyProducingMessageHandler

http://jira.springframework.org/browse/INT-574

Updated the xsd to allow aggregator (and nested <chain/>)
This commit is contained in:
Iwein Fuld
2009-02-10 13:05:26 +00:00
parent 11b0e85afb
commit 965b5fbd0d
3 changed files with 88 additions and 84 deletions

View File

@@ -45,6 +45,13 @@
class="org.springframework.integration.config.ChainParserTests$StubHandler" />
</chain>
<chain input-channel="aggregatorInput" output-channel="output">
<aggregator ref="aggregatorBean" method="aggregate" />
</chain>
<beans:bean id="aggregatorBean"
class="org.springframework.integration.config.ChainParserTests$StubAggregator" />
<beans:bean id="testHeaderValue" class="java.lang.Integer">
<beans:constructor-arg value="123" />
</beans:bean>

View File

@@ -22,6 +22,8 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -35,6 +37,7 @@ import org.springframework.integration.handler.ReplyMessageHolder;
import org.springframework.integration.message.MessageBuilder;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.StringUtils;
/**
* @author Mark Fisher
@@ -127,5 +130,10 @@ public class ChainParserTests {
}
}
public static class StubAggregator {
public String aggregate(List<String> strings){
return StringUtils.collectionToCommaDelimitedString(strings);
}
}
}