From f72cab116c333cee9d7a987fbcde44fd4789f3f4 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Sat, 13 Nov 2010 08:44:38 -0500 Subject: [PATCH] INT-1559 added docs for FTP/FTPS --- docs/src/reference/docbook/ftp.xml | 129 ++++++++++++++++++++++++++++- 1 file changed, 126 insertions(+), 3 deletions(-) diff --git a/docs/src/reference/docbook/ftp.xml b/docs/src/reference/docbook/ftp.xml index 9e9df9d580..1937d696a7 100644 --- a/docs/src/reference/docbook/ftp.xml +++ b/docs/src/reference/docbook/ftp.xml @@ -1,14 +1,137 @@ - FTP Adapter + FTP/FTPS Adapters - Spring Integration provides support for FTP + Spring Integration provides support for FTP and FTPS
Introduction - TODO + File Transfer Protocol (FTP) is a simple network protocol which allows you to transfer files between two computers on the Internet. + + + There are two actors when it comes to FTP communication - client and server. + To transfer files with FTP/FTPS, you use client which initiates a connection to a remote computer + running an FTP server software. After the connection is established, the client can choose + to send and/or receive copies of files. + + + + Spring Integration supports sending and receiving files over FTP/FTPS by providing two types of clients - + Inbound Channel Adapters and Outbound Channel Adapters as well as convenient namespace configuration to define these + clients. + + + FTP + + + + + FTPS +
+ +
+ FTP Inbound Channel Adapter + + FTP Inbound Channel Adapter is a special listener that will connect to the FTP server and will listen + for the remote directory events (e.g., new file created) at which point it will initiate a file transfer. + + + +]]> + + As you can see form the configuration above you can configure FTP Inbound Channel Adapter via inbound-channel-adapter + element while also providing values for various attributes such as user and password to connect to an FTP server, + as well as other attributes. Please refer to the schema for more details on these attributes. + + + It is also important to understand that FTP Inbound Channel Adapter is a polling consumer and + therefore you must configure a poller (global or local). + Once the file has been transferred a Message with java.io.File being a payload will be generated and sent to the channel + identified with channel attribute. + +
+ +
+ FTPS Inbound Channel Adapter + + FTPS Inbound Channel Adapter adds support for secured file receive operations with + FTP servers that support Transport Layer Security (TLS). Configuration of the adapter itself is very similar to the + FTP Inbound Channel Adapter and is use the same inbound-channel-adapter element but from the FTPS namespace. + + + +]]> + +
+ +
+ FTP Outbound Channel Adapter + + + FTP Outbound Channel Adapter is a special MessageHandler that will connect to the + FTP server and will initiate an FTP transfer for every file it will receive in the payload of the Message. It also supports several + representation of the File so you are not limited only to the File object. FTP Outbound Channel Adapter + supports the following payloads: 1) java.io.File - the actual file object; + 2) byte[] - byte array that represents the file contents; 3) java.lang.String - + represents the file path. + + ]]> + + As you can see form the configuration above you can configure FTP Outbound Channel Adapter via + outbound-channel-adapter element while also providing values for various attributes such as user + and password to connect to an FTP server, as well as other attributes. Please refer to the schema for + more details on these attributes. + +
+ +
+ FTPS Outbound Channel Adapter + + FTPS Outbound Channel Adapter adds support for secured file send operations with FTP servers that support + Transport Layer Security (TLS). Configuration of the adapter itself is very similar to the + FTP Outbound Channel Adapter and is use the same outbound-channel-adapter element but + from the FTPS namespace: + +
+ + + + A more practical way to configure these types of adapters would be via Spring's property + placeholder (http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#beans-factory-placeholderconfigurer) + +