diff --git a/docs/src/reference/docbook/sftp.xml b/docs/src/reference/docbook/sftp.xml
index 1748ad669c..3e82fc9a18 100644
--- a/docs/src/reference/docbook/sftp.xml
+++ b/docs/src/reference/docbook/sftp.xml
@@ -3,17 +3,17 @@
xmlns:xlink="http://www.w3.org/1999/xlink">
SFTP Adapters
- Spring Integration provides support for file transfer operations via SFTP
+ Spring Integration provides support for file transfer operations via SFTP.
Introduction
- Secure File Transfer Protocol (SFTP) is a network protocol which allows you to transfer
+ The Secure File Transfer Protocol (SFTP) is a network protocol which allows you to transfer
files between two computers on the Internet over any reliable stream.
- SFTP protocol requires secure channel, such as SSH, as well as visibility to client's identity throughout SFTP session.
+ The SFTP protocol requires a secure channel, such as SSH, as well as visibility to a client's identity throughout the SFTP session.
@@ -31,8 +31,8 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/sftp
SFTP Session Factory
- Before configuring SFTP adapters you must configure Sftp Session Factory. You configure
- Sftp Session Factory via regular bean configuration:
+ Before configuring SFTP adapters you must configure an SFTP Session Factory. You can configure
+ the SFTP Session Factory via a regular bean definition:
Below is a basic configuration:
@@ -44,12 +44,12 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/sftp
]]>
- Now all you need to do is inject this Sftp Session Factory into your adapters.
+ Now all you need to do is inject this SFTP Session Factory into your adapters.
- A more practical way to provide values for Sftp Session Factory 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)
+ A more practical way to provide values for the SFTP Session Factory would be via Spring's property
+ placeholder support (http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#beans-factory-placeholderconfigurer)
@@ -57,7 +57,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/sftp
SFTP Inbound Channel Adapter
- SFTP Inbound Channel Adapter is a special listener that will connect to the FTP server and will listen for
+ The SFTP Inbound Channel Adapter is a special listener that will connect to the server and 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 SFTP Inbound Channel Adapter via
+ As you can see from the configuration above you can configure the SFTP Inbound Channel Adapter via the
inbound-channel-adapter element while also providing values for various attributes such as local-directory
- - where files are going to be transfered TO and remote-directory - the remote source directory
- as well as other attributes including session-factory which we configured earlier.
+ - where files are going to be transferred TO and remote-directory - the remote source directory where files are
+ going to be transferred FROM -
+ as well as other attributes including a session-factory reference to the bean we configured earlier.
Some times file filtering based on the simple pattern specified via filename-pattern attribute might not be
- sufficient enough. If this is the case, you can use filename-regex attribute to specify Regular expression
- (e.g. filename-regex=".*\.test$"). And of course if you need complete control you can use filter
- attribute and provide reference to a custom implementation of the
+ sufficient. If this is the case, you can use the filename-regex attribute to specify a Regular Expression
+ (e.g. filename-regex=".*\.test$"). And of course if you need complete control you can use the filter
+ attribute to provide a reference to a custom implementation of the
org.springframework.integration.file.filters.FileListFilter - a strategy interface for filtering a
- group of files.
+ list of files.
- Please refer to the schema for more details on these attributes.
+ Please refer to the schema for more detail on these attributes.
- It is also important to understand that SFTP Inbound Channel Adapter is a polling consumer and therefore
- you must configure a poller (global or local)
- Once the file has been transferred to a local directory a Message with java.io.File being a
- payload will be generated and sent to the channel identified with channel attribute.
+ It is also important to understand that SFTP Inbound Channel Adapter is a Polling Consumer and therefore
+ you must configure a poller (either a global default or a local sub-element).
+ Once the file has been transferred to a local directory, a Message with java.io.File as its
+ payload type will be generated and sent to the channel identified by the channel attribute.
More on File Filtering and Large Files
- Some times the file that just appeared in the monitored (remote) directory is not complete. Typically such file
- will be written with some temporary extension (e.g., foo.txt.writing) and then renamed after the writing process finished.
- As a user in most cases you are only interested in files that are complete and would like to filter only files that are complete.
- To handle these scenarios use filtering support provided via filename-pattern, filename-regex
- and filter attributes. We also provide a convenient Regex-based implementation
- org.springframework.integration.sftp.filters.SftpPatternMatchingFileListFilter.
- Once configured all you need is include such filter in your adapter via filter attribute.
+ Some times a file that just appeared in the monitored (remote) directory is not complete. Typically such a file
+ will be written with some temporary extension (e.g., foo.txt.writing) and then renamed after the writing process completes.
+ As a user in most cases you are only interested in files that are complete and would like to filter only those files.
+ To handle these scenarios, use filtering support provided via the filename-pattern, filename-regex
+ and filter attributes.
+
+ If you need a custom filter implementation simply include a reference in your adapter via the filter attribute.
-
-
-]]>
+
+
+]]>
@@ -125,12 +126,12 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/sftp
SFTP Outbound Channel Adapter
- SFTP Outbound Channel Adapter is a special MessageHandler that will connect to the
- remote directory and will initiate a file transfer for every file it will receive as a payload of the Message.
- It also supports several representation of the File so you are not limited to the File object.
- Similar to FTP outbound adapter SFTP Outbound Channel Adapter supports the following payloads:
+ The SFTP Outbound Channel Adapteris a special MessageHandler that will connect to the
+ remote directory and will initiate a file transfer for every file it will receive as the payload of an incoming Message.
+ It also supports several representations of the File so you are not limited to the File object.
+ Similar to the FTP outbound adapter, the SFTP 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 contents.
+ the file contents; 3) java.lang.String - text that represents the file contents.
]]>
- As you can see form the configuration above you can configure SFTP Outbound Channel Adapter via
- outbound-channel-adapter.
- Please refer to the schema for more details on these attributes.
+ As you can see from the configuration above you can configure the SFTP Outbound Channel Adapter via
+ the outbound-channel-adapter element.
+ Please refer to the schema for more detail on these attributes.
- SpEL and SFTP Outbound Adapter
+ SpEL and the SFTP Outbound Adapter
- As with many other components in Spring Integration, you can benefit from Spring Expression Language (SpEL) when configuring
- SFTP Outbound Channel Adapter, by specifying two attributes remote-directory-expression and
- remote-filename-generator-expression (see above). Expression evaluation context will have Message as its root object, thus allowing
+ As with many other components in Spring Integration, you can benefit from the Spring Expression Language (SpEL) support when configuring
+ an SFTP Outbound Channel Adapter, by specifying two attributes remote-directory-expression and
+ remote-filename-generator-expression (see above). The expression evaluation context will have the Message as its root object, thus allowing
you to provide expressions which can dynamically compute the file name or the existing directory path
- based on the data in the Message. In the example above we are defining remote-filename-generator-expression attribute with expression
- value which computes the file name based on its original name while also appending suffix '-foo'.
+ based on the data in the Message (either from 'payload' or 'headers'). In the example above we are defining
+ the remote-filename-generator-expression attribute with an expression
+ value that computes the file name based on its original name while also appending a suffix: '-foo'.