<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:int="http://www.springframework.org/schema/integration"
	xmlns:int-ftp="http://www.springframework.org/schema/integration/ftp"
	xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/integration/ftp https://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd">

	<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
		<property name="host" value="192.168.1.155"/>
		<property name="username" value="oleg"/>
		<property name="password" value="password"/>
		<property name="bufferSize" value="1000000"/>
	</bean>

	<int-ftp:inbound-channel-adapter id="ftpInbound"
				channel="ftpChannel" 
				session-factory="ftpClientFactory"
				auto-create-local-directory="true"
				delete-remote-files="false"
				filename-regex=".*\.gz$"
				remote-directory="/home/ozhurakousky/Downloads"
				temporary-file-suffix=".foo"
				local-directory="file:local-test-dir">
			<int:poller fixed-rate="5000"/>
	</int-ftp:inbound-channel-adapter>
	
	<int:channel id="ftpChannel">
		<int:queue/>
	</int:channel>
	
</beans>
