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:
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user