<?xml version="1.0" encoding="UTF-8"?>
<beans:beans
		xmlns="http://www.springframework.org/schema/integration"
		xmlns:beans="http://www.springframework.org/schema/beans"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xmlns:sftp="http://www.springframework.org/schema/integration/sftp"
		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/sftp https://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd">

	<channel id="requestChannel"/>

	<beans:bean id="sftpSessionFactory" class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
		<beans:property name="host" value="localhost"/>
		<beans:property name="knownHostsResource"
						value="#{ new org.springframework.core.io.ByteArrayResource('local, foo.com, bar.foo'.bytes)}"/>
		<beans:property name="privateKey" value="classpath:org/springframework/integration/sftp/config/sftpTest"/>
		<beans:property name="privateKeyPassphrase" value="ghj"/>
		<beans:property name="password" value="hello"/>
		<beans:property name="port" value="2222"/>
		<beans:property name="user" value="oleg"/>
	</beans:bean>

	<sftp:inbound-channel-adapter id="sftpAdapterNoAutoCreate"
								  channel="requestChannel"
								  session-factory="sftpSessionFactory"
								  filter="filter"
								  auto-startup="false"
								  remote-directory="/foo"
								  local-directory="file:foo"
								  auto-create-local-directory="false"
								  delete-remote-files="false">
		<poller fixed-rate="1000"/>
	</sftp:inbound-channel-adapter>

	<beans:bean id="filter" class="org.springframework.integration.sftp.filters.SftpSimplePatternFileListFilter">
		<beans:constructor-arg value="."/>
	</beans:bean>

</beans:beans>
