INT-1631 polishing, moved checkIfRemoteDirExist to synchronier other minor cleanup
This commit is contained in:
@@ -3,8 +3,10 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:int="http://www.springframework.org/schema/integration"
|
||||
xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
|
||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
|
||||
http://www.springframework.org/schema/integration/sftp http://www.springframework.org/schema/integration/sftp/spring-integration-sftp-2.0.xsd">
|
||||
|
||||
|
||||
@@ -29,7 +31,7 @@
|
||||
auto-create-directories="false"
|
||||
auto-delete-remote-files-on-sync="false"
|
||||
filename-pattern=".*\.txt$">
|
||||
<int:poller fixed-rate="10000" max-messages-per-poll="10"/>
|
||||
<int:poller fixed-rate="1000" max-messages-per-poll="10" task-executor="executor"/>
|
||||
</int-sftp:inbound-channel-adapter>
|
||||
|
||||
|
||||
@@ -40,5 +42,7 @@
|
||||
<bean id="filter" class="org.springframework.integration.sftp.filters.SftpPatternMatchingFileListFilter">
|
||||
<constructor-arg value=".*\.txt$"/>
|
||||
</bean>
|
||||
|
||||
<task:executor id="executor" pool-size="15"/>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -29,22 +29,10 @@ public class SftpInboundReceiveSample {
|
||||
@Test
|
||||
@Ignore
|
||||
public void testInbound() throws Exception{
|
||||
ClassPathXmlApplicationContext ac =
|
||||
new ClassPathXmlApplicationContext("SftpInboundReceiveSample-ignored.xml", SftpInboundReceiveSample.class);
|
||||
new ClassPathXmlApplicationContext("SftpInboundReceiveSample-ignored-context.xml", SftpInboundReceiveSample.class);
|
||||
|
||||
System.out.println("Done");
|
||||
System.in.read();
|
||||
ac.stop();
|
||||
// File file = new File("/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-sftp/foo.txt");
|
||||
// if (file.exists()){
|
||||
// Message<File> message = MessageBuilder.withPayload(file).build();
|
||||
// MessageChannel inputChannel = ac.getBean("inputChannel", MessageChannel.class);
|
||||
// inputChannel.send(message);
|
||||
// Thread.sleep(2000);
|
||||
// }
|
||||
// System.out.println("Done");
|
||||
// ac.stop();
|
||||
|
||||
Thread.sleep(3000 * 300);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user