camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r831334 [9/14] - in /websites/production/camel/content: ./ cache/
Date Fri, 07 Sep 2012 22:36:15 GMT
Modified: websites/production/camel/content/ftp.html
==============================================================================
--- websites/production/camel/content/ftp.html (original)
+++ websites/production/camel/content/ftp.html Fri Sep  7 22:36:12 2012
@@ -75,133 +75,336 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2><a shape="rect" name="FTP-FTP%2FSFTPComponentCamel1.xonly"></a>FTP/SFTP Component - <b>Camel 1.x only</b></h2>
+<div class="wiki-content maincontent"><h2><a shape="rect" name="FTP-FTP%2FSFTP%2FFTPSComponent"></a>FTP/SFTP/FTPS Component</h2>
 
 <p>This component provides access to remote file systems over the FTP and SFTP protocols.</p>
 
 <p>Maven users will need to add the following dependency to their <tt>pom.xml</tt> for this component:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-&lt;dependency&gt;
-    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
-    &lt;artifactId&gt;camel-cometd&lt;/artifactId&gt;
-    &lt;version&gt;x.x.x&lt;/version&gt;
-    &lt;!-- use the same version as your Camel core version --&gt;
-&lt;/dependency&gt;
+<pre class="code-xml">
+<span class="code-tag">&lt;dependency&gt;</span>
+    <span class="code-tag">&lt;groupId&gt;</span>org.apache.camel<span class="code-tag">&lt;/groupId&gt;</span>
+    <span class="code-tag">&lt;artifactId&gt;</span>camel-ftp<span class="code-tag">&lt;/artifactId&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>x.x.x<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag"><span class="code-comment">&lt;!-- use the same version as your Camel core version --&gt;</span></span>
+<span class="code-tag">&lt;/dependency&gt;</span>
 </pre>
 </div></div>
 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Using Camel 2.x</b><br clear="none">If you are using Camel 2.x then see the FTP documentation at his <a shape="rect" href="ftp2.html" title="FTP2">link</a>.<br clear="none">
-This documentation is only for Camel 1.x.</td></tr></table></div> 
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>More options</b><br clear="none">See <a shape="rect" href="file2.html" title="File2">File</a> for more options as all the options from <a shape="rect" href="file2.html" title="File2">File</a> is inherited.</td></tr></table></div>
+
+<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Consuming from remote FTP server</b><br clear="none">Make sure you read the section titled <em>Default when consuming files</em> further below for details related to consuming files.</td></tr></table></div>
 
 <h3><a shape="rect" name="FTP-URIformat"></a>URI format</h3>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
-ftp:<span class="code-comment">//[username@]hostname[:port]/filename[?options]
-</span>sftp:<span class="code-comment">//[username@]hostname[:port]/filename[?options]</span>
+ftp:<span class="code-comment">//[username@]hostname[:port]/directoryname[?options]
+</span>sftp:<span class="code-comment">//[username@]hostname[:port]/directoryname[?options]
+</span>ftps:<span class="code-comment">//[username@]hostname[:port]/directoryname[?options]</span>
 </pre>
 </div></div>
 
-<p>Where <b>filename</b> represents the underlying file name or directory. Can contain nested folders.<br clear="none">
-The <b>username</b> is currently only possible to provide in the hostname parameter.</p>
+<p>Where <b>directoryname</b> represents the underlying directory. Can contain nested folders.</p>
 
-<p>If no <b>username</b> is provided then <tt>anonymous</tt> login is attempted using no password.<br clear="none">
-If no <b>port</b> number is provided, Camel will provide default values according to the protocol (ftp = 21, sftp = 22).</p>
+<p>If no <b>username</b> is provided, then <tt>anonymous</tt> login is attempted using no password.<br clear="none">
+If no <b>port</b> number is provided, Camel will provide default values according to the protocol (ftp = 21, sftp = 22, ftps = 2222).</p>
 
 <p>You can append query options to the URI in the following format, <tt>?option=value&amp;option=value&amp;...</tt></p>
 
+<p>This component uses two different libraries for the actual FTP work. FTP and FTPS uses <a shape="rect" class="external-link" href="http://commons.apache.org/net/">Apache Commons Net</a> while SFTP uses <a shape="rect" class="external-link" href="http://www.jcraft.com/jsch/" rel="nofollow">JCraft JSCH</a>.</p>
+
+<p>The FTPS component is only available in Camel 2.2 or newer.<br clear="none">
+FTPS (also known as FTP Secure) is an extension to FTP that adds support for the Transport Layer Security (TLS) and the Secure Sockets Layer (SSL) cryptographic protocols.</p>
+
 <h3><a shape="rect" name="FTP-URIOptions"></a>URI Options</h3>
 
+<p>The options below are exclusive for the FTP component.</p>
+
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>More options</b><br clear="none">See <a shape="rect" href="file2.html" title="File2">File</a> for more options as all the options from <a shape="rect" href="file2.html" title="File2">File</a> is inherited.</td></tr></table></div>
+
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>directory</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Indicates whether or not the given file name should be interpreted by default as a directory or file (as it sometimes hard to be sure with some FTP servers). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>password</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies the password to use to log in to the remote file system. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>binary</tt> </td><td colspan="1" rowspan="1" class
 ="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies the file transfer mode <tt>BINARY</tt> or <tt>ASCII</tt>. Default is <tt>ASCII</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClientConfig</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.5: Reference to a bean in the registry as a <tt><a shape="rect" class="external-link" href="http://commons.apache.org/net/apidocs/org/apache/commons/net/ftp/FTPClientConfig.html">org.apache.commons.net.ftp.FTPClientConfig</a></tt> class. Use this option if you need to configure the client according to the FTP Server date format, locale, timezone, platform etc. See the javadoc <tt><a shape="rect" class="external-link" href="http://commons.apache.org/net/apidocs/org/apache/commons/net/ftp/FTPClientConfig.html">FTPClientConfig</a></tt> for more documentation.</td></tr><tr><td colspa
 n="1" rowspan="1" class="confluenceTd"> <tt>consumer.recursive</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt>/<tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If a directory, will look for changes in files in all the sub-directories. Is <tt>true</tt> by default for Camel 1.4 or older. Will change to <tt>false</tt> by default value as of Camel 1.5. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.setNames</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>@deprecated</b> Used by FTPConsumer. If <tt>true</tt>, Camel will use the filename the file has on the FTP server. The filename is stored on the In message in the header, <tt>FileComponent.HEADER_FILE_NAME</tt>. <b>Note:</b> In Camel 1.4 the default value has changed to <tt>true</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.delay</tt>
  </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>500</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Delay in milliseconds between each poll. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.initialDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>1000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Milliseconds before polling starts. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.userFixedDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Set to <tt>true</tt> to use fixed delay between polls, otherwise fixed rate is used. See <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html" rel="nofollow">ScheduledExecutorService</a> in JDK for details. </td></tr><tr><td colspan="1" rowspan="1" class="confluenc
 eTd"> <tt>consumer.regexPattern</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Used by FTPConsumer. Regular expression to use for matching files when consuming. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.exclusiveReadLock</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt></td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.5: Used by FTPConsumer. If set to <tt>true</tt>, Camel will only poll the ftp files if it has exclusive read access to the file (that is, the file is not in the process of being written). Camel will wait until exclusive access is granted, testing once every second (where the test consists of Camel attempting to rename the file). If set to <tt>false</tt>, Camel will poll the file even if it is in the process of being written. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.deleteFi
 le</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.5: Used by FTPConsumer. Flag to set if the consumed file should be deleted after it has been downloaded. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.moveNamePrefix</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.5: Used by FTPConsumer. The prefix string prepended to the filename when moving it. For example, to move processed files into the <tt>done</tt> directory, set this value to <tt>done/</tt> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.moveNamePostfix</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.5: Used by FTPConsumer. The postfix string appended to the filename when moving it. For example 
 to rename processed files from <tt>foo</tt> to <tt>foo.old</tt>, set this value to <tt>.old</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.excludedNamePrefix</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.5: Used by FTPConsumer. Used to exclude files, if filename starts with the given prefix. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.excludedNamePostfix</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.5: Used by FTPConsumer. Used to exclude files, if filename ends with the given postfix. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>consumer.timestamp</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.5: <b>@deprecated</b> 
 will be removed in Camel 2.0. This option is only for backwards compatability. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>expression</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.5: Use an expression to dynamically set the filename. This allows you very easily to set dynamic pattern style filenames. If an expression is set, it takes precedence over the <tt>org.apache.camel.file.name</tt> header. (Note: The header can itself also be an expression.) The <tt>expression</tt> option supports both <tt>String</tt> and <tt>Expression</tt> types. If the expression is a <tt>String</tt> type, it is <b>always</b> evaluated using the <a shape="rect" href="file-language.html" title="File Language">File Language</a>. If the expression is an <tt>Expression</tt> type, then the specified <tt>Expression</tt> type is used. This allows you, for instance, to use <a shape="rect" href
 ="ognl.html" title="OGNL">OGNL</a> expressions. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>passiveMode</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.6.0: Specifies whether to use a passive mode connections. Default is active mode (<tt>false</tt>). This feature is only for regular FTP, not SFTP. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>knownHosts</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.6.0: Sets the <tt>known_hosts</tt> file, so that the SFTP endpoint can do host key verification. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>privateKeyFile</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.6.0: Set the private key file to that the S
 FTP endpoint can do private key verification. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>privateKeyFilePassphrase</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Camel 1.6.0: Set the private key file passphrase to that the SFTP endpoint can do private key verification. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>username</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies the username to use to log in to the remote file systen. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>password</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies the password to use to log in to the remote file system. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>binary</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Speci
 fies the file transfer mode, BINARY or ASCII. Default is ASCII (<tt>false</tt>). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>disconnect</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.2:</b> Whether or not to disconnect from remote FTP server right after use. Can be used for both consumer and producer. Disconnect will only disconnect the current connection to the FTP server. If you have a consumer which you want to stop, then you need to stop the consumer/route instead. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>localWorkDirectory</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> When consuming, a local work directory can be used to store the remote file content directly in local files, to avoid loading the content into memory. This is beneficial, if you con
 sume a very big remote file and thus can conserve memory. See below for more details. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>passiveMode</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTP and FTPS only</b>: Specifies whether to use passive mode connections. Default is active mode (<tt>false</tt>). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>securityProtocol</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>TLS</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS only:</b> Sets the underlying security protocol. The following values are defined: <br clear="none" class="atl-forced-newline">
+<tt>TLS</tt>: Transport Layer Security <br clear="none" class="atl-forced-newline">
+<tt>SSL</tt>: Secure Sockets Layer </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>disableSecureDataChannelDefaults</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4: FTPS only</b>: Whether or not to disable using default values for <tt>execPbsz</tt> and <tt>execProt</tt> when using secure data transfer. You can set this option to <tt>true</tt> if you want to be in absolute full control what the options <tt>execPbsz</tt> and <tt>execProt</tt> should be used. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>execProt</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4: FTPS only</b>: Will by default use option <tt>P</tt> if secure data channel defaults hasn't been disabled. Possible values are: <br clear="none" class="atl-forced-newline">
+<tt>C</tt>: Clear <br clear="none" class="atl-forced-newline">
+<tt>S</tt>: Safe (SSL protocol only) <br clear="none" class="atl-forced-newline">
+<tt>E</tt>: Confidential (SSL protocol only) <br clear="none" class="atl-forced-newline">
+<tt>P</tt>: Private </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>execPbsz</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4: FTPS only</b>: This option specifies the buffer size of the secure data channel. If option <tt>useSecureDataChannel</tt> has been enabled and this option has not been explicit set, then value <tt>0</tt> is used. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>isImplicit</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS only:</b> Sets the security mode(implicit/explicit). Default is explicit (<tt>false</tt>). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>knownHostsFile</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>SFTP only:</b>
  Sets the <tt>known_hosts</tt> file, so that the SFTP endpoint can do host key verification. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>privateKeyFile</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>SFTP only:</b> Set the private key file to that the SFTP endpoint can do private key verification. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>privateKeyFilePassphrase</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>SFTP only:</b> Set the private key file passphrase to that the SFTP endpoint can do private key verification. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ciphers</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.8.2, 2.9: SFTP only</b> Set a c
 omma separated list of ciphers that will be used in order of preference. Possible cipher names are defined by <a shape="rect" class="external-link" href="http://www.jcraft.com/jsch/" rel="nofollow">JCraft JSCH</a>. Some examples include: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc. If not specified the default list from JSCH will be used. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>fastExistsCheck</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.8.2, 2.9:</b> If set this option to be true, camel-ftp will use the list file directly to check if the file exists. Since some FTP server may not support to list the file directly, if the option is false, camel-ftp will use the old way to list the directory and check if the file exists. Note from <b>Camel 2.10.1</b> onwards this option also influences <tt>readLock=changed</tt> to control w
 hether it performs a fast check to update file information or not. This can be used to speed up the process if the FTP server has a lot of files. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>strictHostKeyChecking</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>no</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>SFTP only:</b> <b>Camel 2.2:</b> Sets whether to use strict host key checking. Possible values are: <tt>no</tt>, <tt>yes</tt> and <tt>ask</tt>. <tt>ask</tt> does not make sense to use as Camel cannot answer the question for you as its meant for human intervention. <b>Note:</b> The default in Camel 2.1 and below was <tt>ask</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maximumReconnectAttempts</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>3</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies the maximum reconnect attempts Camel performs when it tries to 
 connect to the remote FTP server. Use 0 to disable this behavior. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>reconnectDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>1000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Delay in millis Camel will wait before performing a reconnect attempt. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>connectTimeout</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>10000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> Is the connect timeout in millis. This corresponds to using <tt>ftpClient.connectTimeout</tt> for the FTP/FTPS. For SFTP this option is also used when attempting to connect. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>soTimeout</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTP and FTPS Only:</b> <b
 >Camel 2.4:</b> Is the <tt>SocketOptions.SO_TIMEOUT</tt> value in millis. Note SFTP will automatic use the <tt>connectTimeout</tt> as the <tt>soTimeout</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>timeout</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>30000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTP and FTPS Only:</b> <b>Camel 2.4:</b> Is the data timeout in millis. This corresponds to using <tt>ftpClient.dataTimeout</tt> for the FTP/FTPS. For SFTP there is no data timeout. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>throwExceptionOnConnectFailed</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.5:</b> Whether or not to thrown an exception if a successful connection and login could not be establish. This allows a custom <tt>pollStrategy</tt> to deal with the exception, for example to stop the 
 consumer or the likes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>siteCommand</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTP and FTPS Only:</b> <b>Camel 2.5:</b> To execute site commands after successful login. Multiple site commands can be separated using a new line character (\n). Use <tt>help site</tt> to see which site commands your FTP server supports. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>stepwise</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.6:</b> Whether or not stepwise traversing directories should be used or not. Stepwise means that it will CD one directory at a time. See more details below. You can disable this in case you can't use this approach. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>separator</tt> 
 </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>Auto</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.6:</b> Dictates what path separator char to use when uploading files. <tt>Auto</tt> = Use the path provided without altering it. <tt>UNIX</tt> = Use unix style path separators. <tt>Windows</tt> = Use Windows style path separators. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>chmod</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>SFTP Producer Only:</b> <b>Camel 2.9:</b> Allows you to set chmod on the stored file. For example <tt>chmod=640</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>compression</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> 0 </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>SFTP Only:</b> <b>Camel 2.8.3/2.9:</b> To use compression. Specify a level from 1 to 10. <b>Importa
 nt:</b> You must manually add the needed JSCH zlib JAR to the classpath for compression support. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClient</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTP and FTPS Only:</b> <b>Camel 2.1:</b> Allows you to use a custom <tt>org.apache.commons.net.ftp.FTPClient</tt> instance. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClientConfig</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTP and FTPS Only:</b> <b>Camel 2.1:</b> Allows you to use a custom <tt>org.apache.commons.net.ftp.FTPClientConfig</tt> instance. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>serverAliveInterval</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"
 > <b>SFTP Only:</b> <b>Camel 2.8</b> Allows you to set the serverAliveInterval of the sftp session </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>serverAliveCountMax</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>SFTP Only:</b> <b>Camel 2.8</b> Allows you to set the serverAliveCountMax  of the sftp session </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClient.trustStore.file</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS Only:</b> Sets the trust store file, so that the FTPS client can look up for trusted certificates. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClient.trustStore.type</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>JKS</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS Only:</b> Sets the
  trust store type. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClient.trustStore.algorithm</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>SunX509</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS Only:</b> Sets the trust store algorithm. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClient.trustStore.password</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS Only:</b> Sets the trust store password. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClient.keyStore.file</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS Only:</b> Sets the key store file, so that the FTPS client can look up for the private certificate. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClient.keySto
 re.type</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>JKS</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS Only:</b> Sets the key store type. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClient.keyStore.algorithm</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>SunX509</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS Only:</b> Sets the key store algorithm. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClient.keyStore.password</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS Only:</b> Sets the key store password. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>ftpClient.keyStore.keyPassword</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS Only:</b> Sets the privat
 e key password. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>sslContextParameters</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS Only:</b> <b>Camel 2.9:</b> Reference to a <tt>org.apache.camel.util.jsse.SSLContextParameters</tt> in the <a shape="rect" class="external-link" href="http://camel.apache.org/registry.html">Registry</a>.&#160; This reference overrides any configured SSL related options on ftpClient as well as the securityProtocol (SSL, TLS, etc.) set on FtpsConfiguration.&#160; See <a shape="rect" href="camel-configuration-utilities.html" title="Camel Configuration Utilities">Using the JSSE Configuration Utility</a>. </td></tr></tbody></table>
 </div>
 </div>
 
-<h4><a shape="rect" name="FTP-Examples"></a>Examples</h4>
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>FTPS component default trust store</b><br clear="none">When using the <tt>ftpClient.</tt> properties related to SSL with the FTPS component, the trust store accept all certificates. If you only want trust selective certificates, you have to configure the trust store with the <tt>ftpClient.trustStore.xxx</tt> options or by configuring a custom <tt>ftpClient</tt>.
+
+<p>When using <tt>sslContextParameters</tt>, the trust store is managed by the configuration of the provided SSLContextParameters instance.</p></td></tr></table></div>
+
+<p>You can configure additional options on the <tt>ftpClient</tt> and <tt>ftpClientConfig</tt> from the URI directly by using the <tt>ftpClient.</tt> or <tt>ftpClientConfig.</tt> prefix.</p>
+
+<p>For example to set the <tt>setDataTimeout</tt> on the <tt>FTPClient</tt> to 30 seconds you can do:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"ftp:<span class="code-comment">//foo@myserver?password=secret&amp;ftpClient.dataTimeout=30000"</span>).to(<span class="code-quote">"bean:foo"</span>);</span>
+</pre>
+</div></div>
+
+<p>You can mix and match and have use both prefixes, for example to configure date format or timezones.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"ftp:<span class="code-comment">//foo@myserver?password=secret&amp;ftpClient.dataTimeout=30000&amp;ftpClientConfig.serverLanguageCode=fr"</span>).to(<span class="code-quote">"bean:foo"</span>);</span>
+</pre>
+</div></div>
+
+<p>You can have as many of these options as you like.</p>
+
+<p>See the documentation of the <a shape="rect" class="external-link" href="http://commons.apache.org/net/api-2.2/org/apache/commons/net/ftp/FTPClientConfig.html">Apache Commons FTP FTPClientConfig</a> for possible options and more details.<br clear="none">
+And as well for <a shape="rect" class="external-link" href="http://commons.apache.org/net/api-2.2/org/apache/commons/net/ftp/FTPClient.html">Apache Commons FTP FTPClient</a>.</p>
+
+<p>If you do not like having many and long configuration in the url you can refer to the <tt>ftpClient</tt> or <tt>ftpClientConfig</tt> to use by letting Camel lookup in the <a shape="rect" href="registry.html" title="Registry">Registry</a> for it.</p>
+
+<p>For example:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+   &lt;bean id=<span class="code-quote">"myConfig"</span> class=<span class="code-quote">"org.apache.commons.net.ftp.FTPClientConfig"</span>&gt;
+       &lt;property name=<span class="code-quote">"lenientFutureDates"</span> value=<span class="code-quote">"<span class="code-keyword">true</span>"</span>/&gt;
+       &lt;property name=<span class="code-quote">"serverLanguageCode"</span> value=<span class="code-quote">"fr"</span>/&gt;
+   &lt;/bean&gt;
+</pre>
+</div></div>
+
+<p>And then let Camel lookup this bean when you use the # notation in the url.</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"ftp:<span class="code-comment">//foo@myserver?password=secret&amp;ftpClientConfig=#myConfig"</span>).to(<span class="code-quote">"bean:foo"</span>);</span>
+</pre>
+</div></div>
+
+
+<h3><a shape="rect" name="FTP-MoreURIoptions"></a>More URI options</h3>
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">See <a shape="rect" href="file2.html" title="File2">File2</a> as all the options there also applies for this component.</td></tr></table></div>
+
+
+<h3><a shape="rect" name="FTP-Examples"></a>Examples</h3>
+
 <p><tt><a shape="rect" class="external-link" href="ftp://someone@someftpserver.com/public/upload/images/holiday2008?password=secret&amp;binary=true" rel="nofollow">ftp://someone@someftpserver.com/public/upload/images/holiday2008?password=secret&amp;binary=true</a></tt><br clear="none">
-<tt><a shape="rect" class="external-link" href="ftp://someoneelse@someotherftpserver.co.uk:12049/reports/2008/budget.txt?password=secret&amp;binary=false&amp;directory=false" rel="nofollow">ftp://someoneelse@someotherftpserver.co.uk:12049/reports/2008/budget.txt?password=secret&amp;binary=false&amp;directory=false</a></tt><br clear="none">
+<tt><a shape="rect" class="external-link" href="ftp://someoneelse@someotherftpserver.co.uk:12049/reports/2008/password=secret&amp;binary=false" rel="nofollow">ftp://someoneelse@someotherftpserver.co.uk:12049/reports/2008/password=secret&amp;binary=false</a></tt><br clear="none">
 <tt><a shape="rect" class="external-link" href="ftp://publicftpserver.com/download" rel="nofollow">ftp://publicftpserver.com/download</a></tt></p>
 
-<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Timestamp</b><br clear="none">In Camel 1.4 or older the FTP consumer uses an internal timestamp for last polling. This timestamp is used to match for new remote files: if remote file modified timestamp &gt; last poll timestamp =&gt; file can be consumed.
+<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>FTP Consumer does not support concurrency</b><br clear="none">The FTP consumer (with the same endpoint) does not support concurrency (the backing FTP client is not thread safe).<br clear="none">
+You can use multiple FTP consumers to poll from different endpoints. It is only a single endpoint that does not support concurrent consumers.
 
-<p>In Camel 1.5 this algorithm has been disabled by default, as it is not reliable over the FTP protocol. FTP Servers only return file modified timestamps using <tt>hh:mm</tt> (not seconds). And of course the clocks between the client and server can also be out of sync. Bottom line is that timestamp check for FTP protocol should <b>not</b> be used. That is why this feature is marked as <b>@deprecated</b> and will be removed in Camel 2.0.</p>
+<p>The FTP producer does <b>not</b> have this issue, it supports concurrency.</p></td></tr></table></div>
 
-<p>We encourage you to use a different strategy for matching new remote files: such as deleting or moving the file after download.</p></td></tr></table></div>
+<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>More information</b><br clear="none">This component is an extension of the <a shape="rect" href="file2.html" title="File2">File</a> component. So there are more samples and details on the <a shape="rect" href="file2.html" title="File2">File</a> component page.</td></tr></table></div>
 
-<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>FTP does not support concurrency for same endpoint</b><br clear="none">In Camel 1.x both the FTP consumer and FTP producer (created from the same endpoint) does not support concurrency (the backing FTP client is not thread safe).</td></tr></table></div>
+<h3><a shape="rect" name="FTP-Defaultwhenconsumingfiles"></a>Default when consuming files</h3>
 
-<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>More examples</b><br clear="none">This component is an extension of the <a shape="rect" href="file2.html" title="File2">File</a> component. So there could be more samples and details on the <a shape="rect" href="file2.html" title="File2">File</a> component page as well.</td></tr></table></div>
+<p>The <a shape="rect" href="ftp2.html" title="FTP2">FTP</a> consumer will by default leave the consumed files untouched on the remote FTP server. You have to configure it explicitly if you want it to delete the files or move them to another location. For example you can use <tt>delete=true</tt> to delete the files, or use <tt>move=.done</tt> to move the files into a hidden done sub directory.</p>
 
-<h3><a shape="rect" name="FTP-NewdefaultbehaviorforFTP%2FSFTPConsumersinCamel1.5"></a>New default behavior for FTP/SFTP-Consumers in Camel 1.5</h3>
-<p>The consumer will always skip any file which name starts with a dot, such as <tt>".", ".camel", ".m2" or ".groovy"</tt>. Only files (not directories) is matched for valid filename if options such as: <tt>consumer.regexPattern, consumer.excludeNamePrefix, consumer.excludeNamePostfix</tt> is used.</p>
+<p>The regular <a shape="rect" href="file2.html" title="File2">File</a> consumer is different as it will by default move files to a <tt>.camel</tt> sub directory. The reason Camel does <b>not</b> do this by default for the FTP consumer is that it may lack permissions by default to be able to move or delete files.</p>
 
-<p>The consumer recursive option will be changed from <b>true</b> to <b>false</b> as the default value. We don't feel that Camel out-of-the-box should recursive poll.</p>
+<h4><a shape="rect" name="FTP-limitations"></a>limitations</h4>
 
-<p>The consumer will <b>not</b> use timestamp algorithm for determine if a remote file is a new file - see warning section above. To use the old behavior of Camel 1.4 or older you can use the option <tt>consumer.timestamp=true</tt>.</p>
+<p>The option <b>readLock</b> can be used to force Camel <b>not</b> to consume files that is currently in the progress of being written. However, this option is turned off by default, as it requires that the user has write access. See the options table at <a shape="rect" href="file2.html" title="File2">File2</a> for more details about read locks.<br clear="none">
+There are other solutions to avoid consuming files that are currently being written over FTP; for instance, you can write to a temporary destination and move the file after it has been written.</p>
 
-<h3><a shape="rect" name="FTP-ExclusiveReadLock"></a>Exclusive Read Lock</h3>
-<p>The option <b>readLock</b> can be used to force Camel <b>not</b> to consume files that is currently in the progress of being written. However this option is default turned off, as it requires that the user has write access. There are other solutions to avoid consuming files that are currently being written over FTP, for instance you can write the a temporary destination and move the file after it has been written. </p>
+<p>When moving files using <tt>move</tt> or <tt>preMove</tt> option the files are restricted to the FTP_ROOT folder. That prevents you from moving files outside the FTP area. If you want to move files to another area you can use soft links and move files into a soft linked folder.</p>
 
 <h3><a shape="rect" name="FTP-MessageHeaders"></a>Message Headers</h3>
 
 <p>The following message headers can be used to affect the behavior of the component</p>
 
-<div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Header </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> org.apache.camel.file.name </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies the output file name (relative to the endpoint directory) to be used for the output message when sending to the endpoint. If this is not present and no expression either then a generated message Id is used as filename instead.  </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> org.apache.camel.file.name.produced </td><td colspan="1" rowspan="1" class="confluenceTd"> New in Camel 1.5: The actual absolute filepath (path + name) for the output file that was written. This header is set by Camel and its purpose is providing end-users the name of the file that was written. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> file.remote.hos
 t </td><td colspan="1" rowspan="1" class="confluenceTd"> The hostname of the remote server </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> file.remote.name </td><td colspan="1" rowspan="1" class="confluenceTd"> The name of the file consumed from the remote server </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> file.remote.fullName </td><td colspan="1" rowspan="1" class="confluenceTd"> The fullname of the file consumed from the remote server </td></tr></tbody></table>
+<div class="confluenceTableSmall"><div class="table-wrap">
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Header </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelFileName</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies the output file name (relative to the endpoint directory) to be used for the output message when sending to the endpoint. If this is not present and no expression either, then a generated message ID is used as the filename instead. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelFileNameProduced</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The actual absolute filepath (path + name) for the output file that was written. This header is set by Camel and its purpose is providing end-users the name of the file that was written. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelFileBatchIndex</tt> </td><td 
 colspan="1" rowspan="1" class="confluenceTd"> Current index out of total number of files being consumed in this batch. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelFileBatchSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Total number of files being consumed in this batch. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelFileHost</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The remote hostname. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>CamelFileLocalWorkPath</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Path to the local work file, if local work directory is used. </td></tr></tbody></table>
+</div>
 </div>
 
+<h3><a shape="rect" name="FTP-Abouttimeouts"></a>About timeouts</h3>
 
-<h3><a shape="rect" name="FTP-Consumerproperties"></a>Consumer properties</h3>
+<p>The two set of libraries (see top) has different API for setting timeout. You can use the <tt>connectTimeout</tt> option for both of them to set a timeout in millis to establish a network connection. An individual <tt>soTimeout</tt> can also be set on the FTP/FTPS, which corresponds to using <tt>ftpClient.soTimeout</tt>. Notice SFTP will automatically use <tt>connectTimeout</tt> as its <tt>soTimeout</tt>. The <tt>timeout</tt> option only applies for FTP/FTSP as the data timeout, which corresponds to the <tt>ftpClient.dataTimeout</tt> value. All timeout values are in millis.</p>
 
-<p>When using FTPConsumer (downloading files from a FTP Server) the consumer specific properties from the <a shape="rect" href="file2.html" title="File2">File</a> component should be prefixed with "consumer.". For example the delay option from File Component should be specified as "consumer.delay=30000" in the URI. See the samples or some of the unit tests of this component.</p>
 
-<h3><a shape="rect" name="FTP-FilenameExpression"></a>Filename Expression</h3>
-<p>In Camel 1.5 we have support for setting the filename using an expression. This can be set either using the <b>expression</b> option or as a string based <a shape="rect" href="file-language.html" title="File Language">File Language</a> expression in the <tt>org.apache.camel.file.name</tt> header. See the <a shape="rect" href="file-language.html" title="File Language">File Language</a> for some samples.</p>
+<h3><a shape="rect" name="FTP-UsingLocalWorkDirectory"></a>Using Local Work Directory</h3>
 
-<h3><a shape="rect" name="FTP-Camel1.xKnownissues"></a>Camel 1.x Known issues</h3>
+<p>Camel supports consuming from remote FTP servers and downloading the files directly into a local work directory. This avoids reading the entire remote file content into memory as it is streamed directly into the local file using <tt>FileOutputStream</tt>.</p>
 
-<p>See the timestamp warning.</p>
+<p>Camel will store to a local file with the same name as the remote file, though with <tt>.inprogress</tt> as extension while the file is being downloaded. Afterwards, the file is renamed to remove the <tt>.inprogress</tt> suffix. And finally, when the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> is complete the local file is deleted.</p>
 
-<p>When consuming files (downloading) you must use type conversation to either String or to InputStream for ASCII and BINARY file types. <br clear="none">
-In Camel 1.4 this is fixed, as there are build in type converters for the ASCII and BINARY file types, meaning that you do not need the convertBodyTo expression.</p>
+<p>So if you want to download files from a remote FTP server and store it as files then you need to route to a file endpoint such as:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"ftp:<span class="code-comment">//someone@someserver.com?password=secret&amp;localWorkDirectory=/tmp"</span>).to(<span class="code-quote">"file://inbox"</span>);</span>
+</pre>
+</div></div>
+
+<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Optimization by renaming work file</b><br clear="none">The route above is ultra efficient as it avoids reading the entire file content into memory. It will download the remote file directly to a local file stream. The <tt>java.io.File</tt> handle is then used as the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> body. The file producer leverages this fact and can work directly on the work file <tt>java.io.File</tt> handle and perform a <tt>java.io.File.rename</tt> to the target filename. As Camel knows it's a local work file, it can optimize and use a rename instead of a file copy, as the work file is meant to be deleted anyway
 .</td></tr></table></div>
+
+<h3><a shape="rect" name="FTP-Stepwisechangingdirectories"></a>Stepwise changing directories</h3>
+
+<p>Camel <a shape="rect" href="ftp2.html" title="FTP2">FTP</a> can operate in two modes in terms of traversing directories when consuming files (eg downloading) or producing files (eg uploading)</p>
+<ul class="alternate" type="square"><li>stepwise</li><li>not stepwise</li></ul>
+
+
+<p>You may want to pick either one depending on your situation and security issues. Some Camel end users can only download files if they use stepwise, while others can only download if they do not. At least you have the choice to pick (from Camel 2.6 onwards).</p>
+
+<p>In Camel 2.0 - 2.5 there is only one mode and it is:</p>
+<ul class="alternate" type="square"><li>before 2.5 not stepwise</li><li>2.5 stepwise</li></ul>
 
-<p>In Camel 1.4 or below Camel FTPConsumer will poll files regardless if the file is currently being written. See the <b>consumer.exclusiveReadLock</b> option.</p>
 
-<p>Also in Camel 1.3 since setNames is default <b>false</b> then you must explicitly set the filename using the setHeader expression when consuming from FTP directly to File.<br clear="none">
-The code below illustrates this:</p>
+<p>From Camel 2.6 onwards there is now an option <tt>stepwise</tt> you can use to control the behavior.</p>
 
+<p>Note that stepwise changing of directory will in most cases only work when the user is confined to it's home directory and when the home directory is reported as <tt>"/"</tt>.</p>
+
+<p>The difference between the two of them is best illustrated with an example. Suppose we have the following directory structure on the remote FTP server we need to traverse and download files:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
-<span class="code-keyword">private</span> <span class="code-object">String</span> ftpUrl = <span class="code-quote">"ftp:<span class="code-comment">//camelrider@localhost:21/<span class="code-keyword">public</span>/downloads?password=admin&amp;binary=<span class="code-keyword">false</span>"</span>;
-</span><span class="code-keyword">private</span> <span class="code-object">String</span> fileUrl = <span class="code-quote">"file:myfolder/?append=<span class="code-keyword">false</span>&amp;noop=<span class="code-keyword">true</span>"</span>;
-
-<span class="code-keyword">return</span> <span class="code-keyword">new</span> RouteBuilder() {
-    <span class="code-keyword">public</span> void configure() <span class="code-keyword">throws</span> Exception {
-        from(ftpUrl).setHeader(FileComponent.HEADER_FILE_NAME, constant(<span class="code-quote">"downloaded.txt"</span>)).convertBodyTo(<span class="code-object">String</span>.class).to(fileUrl);
-    }
-};
+/
+/one
+/one/two
+/one/two/sub-a
+/one/two/sub-b
 </pre>
 </div></div>
 
-<p>Or you can set the option to <b>true</b> as illustrated below:</p>
+<p>And that we have a file in each of sub-a (a.txt) and sub-b (b.txt) folder.</p>
 
+<h4><a shape="rect" name="FTP-Usingstepwise%3Dtrue%28defaultmode%29"></a>Using stepwise=true (default mode)</h4>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
-<span class="code-keyword">private</span> <span class="code-object">String</span> ftpUrl = <span class="code-quote">"ftp:<span class="code-comment">//camelrider@localhost:21/<span class="code-keyword">public</span>/downloads?password=admin&amp;binary=<span class="code-keyword">false</span>&amp;consumer.setNames=<span class="code-keyword">true</span>"</span>;
-</span><span class="code-keyword">private</span> <span class="code-object">String</span> fileUrl = <span class="code-quote">"file:myfolder/?append=<span class="code-keyword">false</span>&amp;noop=<span class="code-keyword">true</span>"</span>;
+TYPE A
+200 Type set to A
+PWD
+257 <span class="code-quote">"/"</span> is current directory.
+CWD one
+250 CWD successful. <span class="code-quote">"/one"</span> is current directory.
+CWD two
+250 CWD successful. <span class="code-quote">"/one/two"</span> is current directory.
+SYST
+215 UNIX emulated by FileZilla
+PORT 127,0,0,1,17,94
+200 Port command successful
+LIST
+150 Opening data channel <span class="code-keyword">for</span> directory list.
+226 Transfer OK
+CWD sub-a
+250 CWD successful. <span class="code-quote">"/one/two/sub-a"</span> is current directory.
+PORT 127,0,0,1,17,95
+200 Port command successful
+LIST
+150 Opening data channel <span class="code-keyword">for</span> directory list.
+226 Transfer OK
+CDUP
+200 CDUP successful. <span class="code-quote">"/one/two"</span> is current directory.
+CWD sub-b
+250 CWD successful. <span class="code-quote">"/one/two/sub-b"</span> is current directory.
+PORT 127,0,0,1,17,96
+200 Port command successful
+LIST
+150 Opening data channel <span class="code-keyword">for</span> directory list.
+226 Transfer OK
+CDUP
+200 CDUP successful. <span class="code-quote">"/one/two"</span> is current directory.
+CWD /
+250 CWD successful. <span class="code-quote">"/"</span> is current directory.
+PWD
+257 <span class="code-quote">"/"</span> is current directory.
+CWD one
+250 CWD successful. <span class="code-quote">"/one"</span> is current directory.
+CWD two
+250 CWD successful. <span class="code-quote">"/one/two"</span> is current directory.
+PORT 127,0,0,1,17,97
+200 Port command successful
+RETR foo.txt
+150 Opening data channel <span class="code-keyword">for</span> file transfer.
+226 Transfer OK
+CWD /
+250 CWD successful. <span class="code-quote">"/"</span> is current directory.
+PWD
+257 <span class="code-quote">"/"</span> is current directory.
+CWD one
+250 CWD successful. <span class="code-quote">"/one"</span> is current directory.
+CWD two
+250 CWD successful. <span class="code-quote">"/one/two"</span> is current directory.
+CWD sub-a
+250 CWD successful. <span class="code-quote">"/one/two/sub-a"</span> is current directory.
+PORT 127,0,0,1,17,98
+200 Port command successful
+RETR a.txt
+150 Opening data channel <span class="code-keyword">for</span> file transfer.
+226 Transfer OK
+CWD /
+250 CWD successful. <span class="code-quote">"/"</span> is current directory.
+PWD
+257 <span class="code-quote">"/"</span> is current directory.
+CWD one
+250 CWD successful. <span class="code-quote">"/one"</span> is current directory.
+CWD two
+250 CWD successful. <span class="code-quote">"/one/two"</span> is current directory.
+CWD sub-b
+250 CWD successful. <span class="code-quote">"/one/two/sub-b"</span> is current directory.
+PORT 127,0,0,1,17,99
+200 Port command successful
+RETR b.txt
+150 Opening data channel <span class="code-keyword">for</span> file transfer.
+226 Transfer OK
+CWD /
+250 CWD successful. <span class="code-quote">"/"</span> is current directory.
+QUIT
+221 Goodbye
+disconnected.
+</pre>
+</div></div>
 
-<span class="code-keyword">return</span> <span class="code-keyword">new</span> RouteBuilder() {
-    <span class="code-keyword">public</span> void configure() <span class="code-keyword">throws</span> Exception {
-        from(ftpUrl).convertBodyTo(<span class="code-object">String</span>.class).to(fileUrl);
-    }
-};
+<p>As you can see when stepwise is enabled, it will traverse the directory structure using CD xxx.</p>
+
+<h4><a shape="rect" name="FTP-Usingstepwise%3Dfalse"></a>Using stepwise=false</h4>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+230 Logged on
+TYPE A
+200 Type set to A
+SYST
+215 UNIX emulated by FileZilla
+PORT 127,0,0,1,4,122
+200 Port command successful
+LIST one/two
+150 Opening data channel <span class="code-keyword">for</span> directory list
+226 Transfer OK
+PORT 127,0,0,1,4,123
+200 Port command successful
+LIST one/two/sub-a
+150 Opening data channel <span class="code-keyword">for</span> directory list
+226 Transfer OK
+PORT 127,0,0,1,4,124
+200 Port command successful
+LIST one/two/sub-b
+150 Opening data channel <span class="code-keyword">for</span> directory list
+226 Transfer OK
+PORT 127,0,0,1,4,125
+200 Port command successful
+RETR one/two/foo.txt
+150 Opening data channel <span class="code-keyword">for</span> file transfer.
+226 Transfer OK
+PORT 127,0,0,1,4,126
+200 Port command successful
+RETR one/two/sub-a/a.txt
+150 Opening data channel <span class="code-keyword">for</span> file transfer.
+226 Transfer OK
+PORT 127,0,0,1,4,127
+200 Port command successful
+RETR one/two/sub-b/b.txt
+150 Opening data channel <span class="code-keyword">for</span> file transfer.
+226 Transfer OK
+QUIT
+221 Goodbye
+disconnected.
 </pre>
 </div></div>
 
-<h3><a shape="rect" name="FTP-Sample"></a>Sample</h3>
+<p>As you can see when not using stepwise, there are no CD operation invoked at all.</p>
+
+<h3><a shape="rect" name="FTP-Samples"></a>Samples</h3>
 
-<p>In the sample below we setup Camel to download all the reports from the FTP server once every hour (60 min) as BINARY content and store it as files on the local file system.</p>
+<p>In the sample below we set up Camel to download all the reports from the FTP server once every hour (60 min) as BINARY content and store it as files on the local file system.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java"><span class="code-keyword">protected</span> RouteBuilder createRouteBuilder() <span class="code-keyword">throws</span> Exception {
     <span class="code-keyword">return</span> <span class="code-keyword">new</span> RouteBuilder() {
@@ -216,8 +419,8 @@ The code below illustrates this:</p>
             <span class="code-comment">// notice that the FTPConsumer properties must be prefixed with <span class="code-quote">"consumer."</span> in the URL
 </span>            <span class="code-comment">// the delay parameter is from the FileConsumer component so we should use consumer.delay as
 </span>            <span class="code-comment">// the URI parameter name. The FTP Component is an extension of the File Component.
-</span>            from(<span class="code-quote">"ftp:<span class="code-comment">//scott@localhost/<span class="code-keyword">public</span>/reports?password=tiger&amp;binary=<span class="code-keyword">true</span>&amp;consumer.delay="</span> + delay).
-</span>                to(<span class="code-quote">"file:<span class="code-comment">//target/test-reports"</span>);
+</span>            from(<span class="code-quote">"ftp:<span class="code-comment">//tiger:scott@localhost/<span class="code-keyword">public</span>/reports?binary=<span class="code-keyword">true</span>&amp;consumer.delay="</span> + delay).
+</span>                    to(<span class="code-quote">"file:<span class="code-comment">//target/test-reports"</span>);
 </span>        }
     };
 }
@@ -228,70 +431,102 @@ The code below illustrates this:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-xml">
   <span class="code-tag">&lt;route&gt;</span>
-     <span class="code-tag">&lt;from uri=<span class="code-quote">"ftp://scott@localhost/public/reports?password=tiger&amp;amp;binary=true&amp;amp;consumer.delay=60000"</span>/&gt;</span>
+     <span class="code-tag">&lt;from uri=<span class="code-quote">"ftp://scott@localhost/public/reports?password=tiger&amp;amp;binary=true&amp;amp;delay=60000"</span>/&gt;</span>
      <span class="code-tag">&lt;to uri=<span class="code-quote">"file://target/test-reports"</span>/&gt;</span>
   <span class="code-tag">&lt;/route&gt;</span>
 </pre>
 </div></div>
 
-<h4><a shape="rect" name="FTP-Usingexpressionforfilenames"></a>Using expression for filenames</h4>
+<h4><a shape="rect" name="FTP-ConsumingaremoteFTPSserver%28implicitSSL%29andclientauthentication"></a>Consuming a remote FTPS server (implicit SSL) and client authentication</h4>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-java">
+from("ftps:<span class="code-comment">//admin@localhost:2222/<span class="code-keyword">public</span>/camel?password=admin&amp;securityProtocol=SSL&amp;isImplicit=<span class="code-keyword">true</span>
+</span>      &amp;ftpClient.keyStore.file=./src/test/resources/server.jks
+      &amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password")
+  .to(<span class="code-quote">"bean:foo"</span>);
+</pre>
+</div></div>
 
-<p>In this sample we want to move consumed files to a backup folder using today's date as a sub foldername. Notice that the move happens on the remote FTP server. If you want to store the downloaded file on your local disk then route it to the <a shape="rect" href="file2.html" title="File2">File</a> component as the sample above illustrates.</p>
+<h4><a shape="rect" name="FTP-ConsumingaremoteFTPSserver%28explicitTLS%29andacustomtruststoreconfiguration"></a>Consuming a remote FTPS server (explicit TLS) and a custom trust store configuration</h4>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
-from(ftpUrl + <span class="code-quote">"&amp;expression=backup/${date:now:yyyyMMdd}/${file:name}"</span>).to(<span class="code-quote">"..."</span>);
+from(<span class="code-quote">"ftps:<span class="code-comment">//admin@localhost:2222/<span class="code-keyword">public</span>/camel?password=admin&amp;ftpClient.trustStore.file=./src/test/resources/server.jks&amp;ftpClient.trustStore.password=password"</span>)
+</span>  .to(<span class="code-quote">"bean:foo"</span>);
 </pre>
 </div></div>
 
-<p>See <a shape="rect" href="file-language.html" title="File Language">File Language</a> for more samples.</p>
+<h3><a shape="rect" name="FTP-Filterusing%7B%7Borg.apache.camel.component.file.GenericFileFilter%7D%7D"></a>Filter using <tt>org.apache.camel.component.file.GenericFileFilter</tt></h3>
 
-<h4><a shape="rect" name="FTP-ConsumingaremoteFTPservertriggeredbyaroute"></a>Consuming a remote FTP server triggered by a route</h4>
-<p>The FTP consumer is built as a scheduled consumer to be used in the <b>from</b> route. However if you want to start consuming from a FTP server triggered within a route it's a bit cumbersome to do this in Camel 1.x (we plan to improve this in Camel 2.x). However it's possible as this code below demonstrates.</p>
+<p>Camel supports pluggable filtering strategies. This strategy it to use the build in <tt>org.apache.camel.component.file.GenericFileFilter</tt> in Java. You can then configure the endpoint with such a filter to skip certain filters before being processed.</p>
 
-<p>In the sample we have a <a shape="rect" href="seda.html" title="SEDA">SEDA</a> queue where a message arrives that holds a message containing a filename to poll from a remote FTP server. So we setup a basic FTP url as:</p>
+<p>In the sample we have built our own filter that only accepts files starting with report in the filename.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-comment">// we use directory=<span class="code-keyword">false</span> to indicate we only want to consume a single file
-</span><span class="code-comment">// we use delay=5000 to use 5 sec delay between pools to avoid polling a second time before we stop the consumer
-</span><span class="code-comment">// <span class="code-keyword">this</span> is because we only want to run a single poll and get the file
-</span><span class="code-comment">// file=getme/ is the path to the folder where the file is
-</span><span class="code-keyword">private</span> <span class="code-object">String</span> getUrl = <span class="code-quote">"ftp:<span class="code-comment">//admin@localhost:"</span> + port + <span class="code-quote">"?password=admin&amp;binary=<span class="code-keyword">false</span>&amp;directory=<span class="code-keyword">false</span>&amp;consumer.delay=5000&amp;file=getme/"</span>;</span>
+<pre class="code-java"><span class="code-keyword">public</span> class MyFileFilter&lt;T&gt; <span class="code-keyword">implements</span> GenericFileFilter&lt;T&gt; {
+
+    <span class="code-keyword">public</span> <span class="code-object">boolean</span> accept(GenericFile&lt;T&gt; file) {
+        <span class="code-comment">// we only want report files 
+</span>        <span class="code-keyword">return</span> file.getFileName().startsWith(<span class="code-quote">"report"</span>);
+    }
+}
 </pre>
 </div></div>
 
-<p>And then we have the route where we use <a shape="rect" href="processor.html" title="Processor">Processor</a> within the route so we can use Java code. In this Java code we create the ftp consumer that downloads the file we want. And after the download we can get the content of the file and put it in the original exchange that continues being routed. As this is based on an unit test it routes to a <a shape="rect" href="mock.html" title="Mock">Mock</a> endpoint.</p>
+<p>And then we can configure our route using the <b>filter</b> attribute to reference our filter (using <tt>#</tt> notation) that we have defined in the spring XML file:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"seda:start"</span>).process(<span class="code-keyword">new</span> Processor() {
-    <span class="code-keyword">public</span> void process(<span class="code-keyword">final</span> Exchange exchange) <span class="code-keyword">throws</span> Exception {
-        <span class="code-comment">// get the filename from our custome header we want to get from a remote server
-</span>        <span class="code-object">String</span> filename = exchange.getIn().getHeader(<span class="code-quote">"myfile"</span>, <span class="code-object">String</span>.class);
+<pre class="code-xml">
+   <span class="code-tag"><span class="code-comment">&lt;!-- define our sorter as a plain spring bean --&gt;</span></span>
+   <span class="code-tag">&lt;bean id=<span class="code-quote">"myFilter"</span> class=<span class="code-quote">"com.mycompany.MyFileFilter"</span>/&gt;</span>
 
-        <span class="code-comment">// construct the total url <span class="code-keyword">for</span> the ftp consumer
-</span>        <span class="code-object">String</span> url = getUrl + filename;
+  <span class="code-tag">&lt;route&gt;</span>
+    <span class="code-tag">&lt;from uri=<span class="code-quote">"ftp://someuser@someftpserver.com?password=secret&amp;amp;filter=#myFilter"</span>/&gt;</span>
+    <span class="code-tag">&lt;to uri=<span class="code-quote">"bean:processInbox"</span>/&gt;</span>
+  <span class="code-tag">&lt;/route&gt;</span>
+</pre>
+</div></div>
 
-        <span class="code-comment">// create a ftp endpoint
-</span>        Endpoint ftp = context.getEndpoint(url);
 
-        <span class="code-comment">// create a polling consumer so we can poll the remote ftp file
-</span>        PollingConsumer consumer = ftp.createPollingConsumer();
-        consumer.start();
-        <span class="code-comment">// receive the remote ftp without timeout
-</span>        Exchange result = consumer.receive();
-        <span class="code-comment">// we must stop the consumer
-</span>        consumer.stop();
+<h3><a shape="rect" name="FTP-FilteringusingANTpathmatcher"></a>Filtering using ANT path matcher</h3>
 
-        <span class="code-comment">// the result is the response from the FTP consumer (the downloaded file)
-</span>        <span class="code-comment">// replace the outher exchange with the content from the downloaded file
-</span>        exchange.getIn().setBody(result.getIn().getBody());
-    }
-}).to(<span class="code-quote">"mock:result"</span>);
+<p>The ANT path matcher is a filter that is shipped out-of-the-box in the <b>camel-spring</b> jar. So you need to depend on <b>camel-spring</b> if you are using Maven.<br clear="none">
+The reason is that we leverage Spring's <a shape="rect" class="external-link" href="http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/util/AntPathMatcher.html" rel="nofollow">AntPathMatcher</a> to do the actual matching.</p>
+
+<p>The file paths are matched with the following rules:</p>
+<ul class="alternate" type="square"><li><tt>?</tt> matches one character</li><li><tt>*</tt> matches zero or more characters</li><li><tt>**</tt> matches zero or more directories in a path</li></ul>
+
+
+<p>The sample below demonstrates how to use it:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml"><span class="code-tag">&lt;bean class=<span class="code-quote">"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"</span>/&gt;</span>
+<span class="code-tag">&lt;camelContext xmlns=<span class="code-quote">"http://camel.apache.org/schema/spring"</span>&gt;</span>
+    <span class="code-tag">&lt;template id=<span class="code-quote">"camelTemplate"</span>/&gt;</span>
+
+    <span class="code-tag"><span class="code-comment">&lt;!-- use myFilter as filter to allow setting ANT paths for which files to scan for --&gt;</span></span>
+    <span class="code-tag">&lt;endpoint id=<span class="code-quote">"myFTPEndpoint"</span> uri=<span class="code-quote">"ftp://admin@localhost:${SpringFileAntPathMatcherRemoteFileFilterTest.ftpPort}/antpath?password=admin&amp;amp;recursive=true&amp;amp;delay=10000&amp;amp;initialDelay=2000&amp;amp;filter=#myAntFilter"</span>/&gt;</span>
+
+    <span class="code-tag">&lt;route&gt;</span>
+        <span class="code-tag">&lt;from ref=<span class="code-quote">"myFTPEndpoint"</span>/&gt;</span>
+        <span class="code-tag">&lt;to uri=<span class="code-quote">"mock:result"</span>/&gt;</span>
+    <span class="code-tag">&lt;/route&gt;</span>
+<span class="code-tag">&lt;/camelContext&gt;</span>
+
+<span class="code-tag"><span class="code-comment">&lt;!-- we use the AntPathMatcherRemoteFileFilter to use ant paths for includes and exlucde --&gt;</span></span>
+<span class="code-tag">&lt;bean id=<span class="code-quote">"myAntFilter"</span> class=<span class="code-quote">"org.apache.camel.component.file.AntPathMatcherGenericFileFilter"</span>&gt;</span>
+    <span class="code-tag"><span class="code-comment">&lt;!-- include and file in the subfolder that has day in the name --&gt;</span></span>
+    <span class="code-tag">&lt;property name=<span class="code-quote">"includes"</span> value=<span class="code-quote">"**/subfolder/**/*day*"</span>/&gt;</span>
+    <span class="code-tag"><span class="code-comment">&lt;!-- exclude all files with bad in name or .xml files. Use comma to seperate multiple excludes --&gt;</span></span>
+    <span class="code-tag">&lt;property name=<span class="code-quote">"excludes"</span> value=<span class="code-quote">"**/*bad*,**/*.xml"</span>/&gt;</span>
+<span class="code-tag">&lt;/bean&gt;</span>
 </pre>
 </div></div>
 
 <h3><a shape="rect" name="FTP-Debuglogging"></a>Debug logging</h3>
+
 <p>This component has log level <b>TRACE</b> that can be helpful if you have problems.</p>
 
 <h3><a shape="rect" name="FTP-SeeAlso"></a>See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="file2.html" title="File2">File2</a></li></ul>
 </div>
         </td>
         <td valign="top">

Modified: websites/production/camel/content/ftp2.html
==============================================================================
--- websites/production/camel/content/ftp2.html (original)
+++ websites/production/camel/content/ftp2.html Fri Sep  7 22:36:12 2012
@@ -75,7 +75,7 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2><a shape="rect" name="FTP2-FTP%2FSFTP%2FFTPSComponentCamel2.0onwards"></a>FTP/SFTP/FTPS Component - <b>Camel 2.0 onwards</b></h2>
+<div class="wiki-content maincontent"><h2><a shape="rect" name="FTP2-FTP%2FSFTP%2FFTPSComponent"></a>FTP/SFTP/FTPS Component</h2>
 
 <p>This component provides access to remote file systems over the FTP and SFTP protocols.</p>
 
@@ -91,10 +91,7 @@
 </pre>
 </div></div>
 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Using Camel 1.x</b><br clear="none">If you are using Camel 1.x then see this <a shape="rect" href="ftp.html" title="FTP">link</a> for documentation.<br clear="none">
-This page is only for Camel 2.0 or newer.</td></tr></table></div>
-
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>More options</b><br clear="none">See <a shape="rect" href="file2.html" title="File2">File2</a> for more options as all the options from <a shape="rect" href="file2.html" title="File2">File2</a> is inherited.</td></tr></table></div>
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>More options</b><br clear="none">See <a shape="rect" href="file2.html" title="File2">File</a> for more options as all the options from <a shape="rect" href="file2.html" title="File2">File</a> is inherited.</td></tr></table></div>
 
 <div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Consuming from remote FTP server</b><br clear="none">Make sure you read the section titled <em>Default when consuming files</em> further below for details related to consuming files.</td></tr></table></div>
 
@@ -122,9 +119,9 @@ FTPS (also known as FTP Secure) is an ex
 
 <h3><a shape="rect" name="FTP2-URIOptions"></a>URI Options</h3>
 
-<p>The options below are exclusive for the <a shape="rect" href="ftp2.html" title="FTP2">FTP2</a> component.</p>
+<p>The options below are exclusive for the FTP component.</p>
 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>More options</b><br clear="none">See <a shape="rect" href="file2.html" title="File2">File2</a> for more options as all the options from <a shape="rect" href="file2.html" title="File2">File2</a> is inherited.</td></tr></table></div>
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>More options</b><br clear="none">See <a shape="rect" href="file2.html" title="File2">File</a> for more options as all the options from <a shape="rect" href="file2.html" title="File2">File</a> is inherited.</td></tr></table></div>
 
 <div class="confluenceTableSmall"><div class="table-wrap">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>username</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies the username to use to log in to the remote file systen. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>password</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Specifies the password to use to log in to the remote file system. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>binary</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Speci
 fies the file transfer mode, BINARY or ASCII. Default is ASCII (<tt>false</tt>). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>disconnect</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.2:</b> Whether or not to disconnect from remote FTP server right after use. Can be used for both consumer and producer. Disconnect will only disconnect the current connection to the FTP server. If you have a consumer which you want to stop, then you need to stop the consumer/route instead. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>localWorkDirectory</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> When consuming, a local work directory can be used to store the remote file content directly in local files, to avoid loading the content into memory. This is beneficial, if you con
 sume a very big remote file and thus can conserve memory. See below for more details. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>passiveMode</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTP and FTPS only</b>: Specifies whether to use passive mode connections. Default is active mode (<tt>false</tt>). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>securityProtocol</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>TLS</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>FTPS only:</b> Sets the underlying security protocol. The following values are defined: <br clear="none" class="atl-forced-newline">
@@ -197,7 +194,7 @@ You can use multiple FTP consumers to po
 
 <p>The FTP producer does <b>not</b> have this issue, it supports concurrency.</p></td></tr></table></div>
 
-<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>More information</b><br clear="none">This component is an extension of the <a shape="rect" href="file2.html" title="File2">File2</a> component. So there are more samples and details on the <a shape="rect" href="file2.html" title="File2">File2</a> component page.</td></tr></table></div>
+<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>More information</b><br clear="none">This component is an extension of the <a shape="rect" href="file2.html" title="File2">File</a> component. So there are more samples and details on the <a shape="rect" href="file2.html" title="File2">File</a> component page.</td></tr></table></div>
 
 <h3><a shape="rect" name="FTP2-Defaultwhenconsumingfiles"></a>Default when consuming files</h3>
 
@@ -249,8 +246,8 @@ from(<span class="code-quote">"ftp:<span
 
 <p>You may want to pick either one depending on your situation and security issues. Some Camel end users can only download files if they use stepwise, while others can only download if they do not. At least you have the choice to pick (from Camel 2.6 onwards).</p>
 
-<p>In Came 2.0 - 2.5 there is only one mode and it is:</p>
-<ul class="alternate" type="square"><li>2.0 to 2.4 not stepwise</li><li>2.5 stepwise</li></ul>
+<p>In Camel 2.0 - 2.5 there is only one mode and it is:</p>
+<ul class="alternate" type="square"><li>before 2.5 not stepwise</li><li>2.5 stepwise</li></ul>
 
 
 <p>From Camel 2.6 onwards there is now an option <tt>stepwise</tt> you can use to control the behavior.</p>

Modified: websites/production/camel/content/ghttp.html
==============================================================================
--- websites/production/camel/content/ghttp.html (original)
+++ websites/production/camel/content/ghttp.html Fri Sep  7 22:36:12 2012
@@ -77,7 +77,8 @@
         <td valign="top" width="100%">
 <div class="wiki-content maincontent"><h2><a shape="rect" name="ghttp-%7B%7Bghttp%7D%7DComponent"></a><tt>ghttp</tt> Component</h2>
 
-<p>The <tt>ghttp</tt> component contributes to the <a shape="rect" href="gae.html" title="GAE">Camel Components for Google App Engine</a> (GAE). It provides connectivity to the GAE <a shape="rect" class="external-link" href="http://code.google.com/appengine/docs/java/urlfetch/" rel="nofollow">URL fetch service</a> but can also be used to receive messages from servlets (the only way to receive HTTP requests on GAE). This is achieved by extending the <tt><a shape="rect" href="servlet.html" title="SERVLET">Servlet component</a></tt>. As a consequence, <tt>ghttp</tt> URI formats and options sets differ on the consumer-side (<tt>from</tt>) and producer-side (<tt>to</tt>). </p>
+<p><b>Available as of Camel 2.1</b><br clear="none">
+The <tt>ghttp</tt> component contributes to the <a shape="rect" href="gae.html" title="GAE">Camel Components for Google App Engine</a> (GAE). It provides connectivity to the GAE <a shape="rect" class="external-link" href="http://code.google.com/appengine/docs/java/urlfetch/" rel="nofollow">URL fetch service</a> but can also be used to receive messages from servlets (the only way to receive HTTP requests on GAE). This is achieved by extending the <tt><a shape="rect" href="servlet.html" title="SERVLET">Servlet component</a></tt>. As a consequence, <tt>ghttp</tt> URI formats and options sets differ on the consumer-side (<tt>from</tt>) and producer-side (<tt>to</tt>). </p>
 
 <h3><a shape="rect" name="ghttp-URIformat"></a>URI format</h3>
 
@@ -201,13 +202,11 @@ from(...)
 <span class="code-tag">&lt;dependency&gt;</span>
     <span class="code-tag">&lt;groupId&gt;</span>org.apache.camel<span class="code-tag">&lt;/groupId&gt;</span>
     <span class="code-tag">&lt;artifactId&gt;</span>camel-gae<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>${camel-version}<span class="code-tag">&lt;/version&gt;</span>
+    <span class="code-tag">&lt;version&gt;</span>x.x.x<span class="code-tag">&lt;/version&gt;</span>
 <span class="code-tag">&lt;/dependency&gt;</span>
 </pre>
 </div></div>
 
-<p>where <tt>${camel-version</tt>} must be replaced by the actual version of Camel (2.1.0 or higher).</p>
-
 <h3><a shape="rect" name="ghttp-SeeAlso"></a>See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>
 



Mime
View raw message