INT-2275: any outbound-channel-adapter in <chain>

Add re-init logic for nested chains
Add logic about nested element for AbstractChannelAdapterParser
Refactor of DefaultOutboundChannelAdapterParser
Test for non-last nested chain with some outbound-channel-adapter
Improve XSD for chain-type
Manual outbound-channel-adapter ability for chain
Integration tests for all outbound-channel-adapter within <chain>
Remove redundant 'return-value-required' attribute from <stored-proc-outbound-channel-adapter>
Add support 'expectReply' for FileWritingMessageHandler

INT-2275 polishing & refactor FileOutbound*Parser

HttpRequestExecutingMessageHandlerTests polishing

INT-2275: polishing JavaDoc
This commit is contained in:
Artem Bilan
2012-01-03 23:26:16 +02:00
committed by Oleg Zhurakousky
parent 4d5b8d5be1
commit 45c429ee2b
58 changed files with 1302 additions and 318 deletions

View File

@@ -24,20 +24,22 @@ import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.nio.charset.Charset;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.DirectFieldAccessor;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.message.GenericMessage;
import org.springframework.integration.stream.CharacterStreamWritingMessageHandler;
/**
* @author Mark Fisher
* @author Gary Russell
* @author Artem Bilan
*/
public class ConsoleOutboundChannelAdapterParserTests {
@@ -156,4 +158,13 @@ public class ConsoleOutboundChannelAdapterParserTests {
assertEquals("foo" + System.getProperty("line.separator"), out.toString());
}
@Test //INT-2275
public void stdoutInsideNestedChain() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"consoleOutboundChannelAdapterParserTests.xml", ConsoleOutboundChannelAdapterParserTests.class);
DirectChannel channel = context.getBean("stdoutInsideNestedChain", DirectChannel.class);
this.resetStreams();
channel.send(new GenericMessage<String>("foo"));
assertEquals("foobar", out.toString());
}
}

View File

@@ -20,4 +20,11 @@
<stdout-channel-adapter id="newlineAdapter" append-newline="true" channel="testChannel"/>
</beans:beans>
<integration:chain input-channel="stdoutInsideNestedChain">
<integration:transformer expression="payload + 'bar'"/>
<integration:chain>
<stdout-channel-adapter/>
</integration:chain>
</integration:chain>
</beans:beans>