Taught the FTP adapter how to do file name filtering and predicates INT-1357

This commit is contained in:
Josh Long
2010-08-18 03:17:49 +00:00
parent 6dec375d36
commit 8307772dd0
12 changed files with 215 additions and 24 deletions

View File

@@ -1,14 +1,10 @@
package org.springframework.integration.ftp;
import org.apache.commons.lang.StringUtils;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.Message;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.stereotype.Component;
import java.io.File;

View File

@@ -13,10 +13,15 @@
location="file://${user.home}/Desktop/ftp.properties"
ignore-unresolvable="true"/>
<bean class="org.springframework.integration.ftp.PatternMatchingFTPFileListFilter" id="patternMatchingFTPFileListFilter">
<property name="patternExpression" value=".*?jpg"/>
</bean>
<ftp:inbound-channel-adapter remote-directory="${ftp.remotedir}" channel="ftpIn" auto-create-directories="true"
host="${ftp.host}" auto-delete-remote-files-on-sync="false"
username="${ftp.username}" password="${ftp.password}" port="2222"
client-mode="passive-local-data-connection-mode"
username="${ftp.username}" password="${ftp.password}" port="2222"
client-mode="passive-local-data-connection-mode"
filename-pattern=".*?jpg"
>
<int:poller>
<int:interval-trigger interval="10000" time-unit="MILLISECONDS"/>
@@ -30,4 +35,4 @@
<int:service-activator input-channel="ftpIn" ref="inboundFTPFileServiceActivator"/>
</beans>
</beans>