Modified: websites/production/camel/content/ftp.html
==============================================================================
--- websites/production/camel/content/ftp.html (original)
+++ websites/production/camel/content/ftp.html Sun Jan 25 12:18:22 2015
@@ -86,268 +86,101 @@
<tbody>
<tr>
<td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2
id="FTP-FTP/SFTP/FTPSComponent">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
<code>pom.xml</code> for this component:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false"
type="syntaxhighlighter"><![CDATA[
-<dependency>
+<div class="wiki-content maincontent"><h2
id="FTP-FTP/SFTP/FTPSComponent">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
<code>pom.xml</code> for this component:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false"
type="syntaxhighlighter"><![CDATA[<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
]]></script>
-</div></div>
-
- <div class="aui-message hint shadowed information-macro">
+</div></div> <div class="aui-message hint shadowed information-macro">
<p class="title">More options</p>
<span class="aui-icon icon-hint">Icon</span>
<div class="message-content">
-
-<p>See <a shape="rect" href="file2.html">File</a> for more options as all the
options from <a shape="rect" href="file2.html">File</a> is inherited.</p>
+ <p>See <a shape="rect" href="file2.html">File</a>
for more options as all the options from <a shape="rect"
href="file2.html">File</a> is inherited.</p>
</div>
</div>
-
-
<div class="aui-message success shadowed information-macro">
<p class="title">Consuming from remote FTP server</p>
<span class="aui-icon icon-success">Icon</span>
<div class="message-content">
-
-<p>Make sure you read the section titled <em>Default when consuming files</em>
further below for details related to consuming files.</p>
+ <p>Make sure you read the section titled
<em>Default when consuming files</em> further below for details related to
consuming files.</p>
</div>
</div>
-
-
-<h3 id="FTP-URIformat">URI format</h3>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
-ftp://[username@]hostname[:port]/directoryname[?options]
+<h3 id="FTP-URIformat">URI format</h3><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ftp://[username@]hostname[:port]/directoryname[?options]
sftp://[username@]hostname[:port]/directoryname[?options]
ftps://[username@]hostname[:port]/directoryname[?options]
]]></script>
-</div></div>
-
-<p>Where <strong>directoryname</strong> represents the underlying directory.
Can contain nested folders.</p>
-
-<p>If no <strong>username</strong> is provided, then <code>anonymous</code>
login is attempted using no password.<br clear="none">
-If no <strong>port</strong> 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,
<code>?option=value&option=value&...</code></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 id="FTP-URIOptions">URI Options</h3>
-
-<p>The options below are exclusive for the FTP component.</p>
-
- <div class="aui-message hint shadowed information-macro">
+</div></div><p>Where <strong>directoryname</strong> represents the underlying
directory. Can contain nested folders.</p><p>If no <strong>username</strong> is
provided, then <code>anonymous</code> login is attempted using no password.<br
clear="none"> If no <strong>port</strong> 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,
<code>?option=value&option=value&...</code></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 Tr
ansport Layer Security (TLS) and the Secure Sockets Layer (SSL) cryptographic
protocols.</p><h3 id="FTP-URIOptions">URI Options</h3><p>The options below are
exclusive for the FTP component.</p> <div class="aui-message hint shadowed
information-macro">
<p class="title">More options</p>
<span class="aui-icon icon-hint">Icon</span>
<div class="message-content">
-
-<p>See <a shape="rect" href="file2.html">File</a> for more options as all the
options from <a shape="rect" href="file2.html">File</a> is inherited.</p>
+ <p>See <a shape="rect" href="file2.html">File</a>
for more options as all the options from <a shape="rect"
href="file2.html">File</a> is inherited.</p>
</div>
</div>
-
-
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>username</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies the
username to use to log in to the remote file systen. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>password</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies the
password to use to log in to the remote file system. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>binary</code>
</p></td><td colspan="1" row
span="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Specifies the file transfer mode, BINARY
or ASCII. Default is ASCII (<code>false</code>). </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>disconnect</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>false</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>Camel 2.2:</strong> 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. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>localWorkDirectory</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><
p> 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 consume a very big remote file and thus can conserve
memory. See below for more details. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>passiveMode</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTP and
FTPS only</strong>: Specifies whether to use passive mode connections. Default
is active mode (<code>false</code>). </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>securityProtocol</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>TLS</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTPS only:</strong>
Sets the underlying security protocol. The following values are defined: <br
clear="no
ne" class="atl-forced-newline">
-<code>TLS</code>: Transport Layer Security <br clear="none"
class="atl-forced-newline">
-<code>SSL</code>: Secure Sockets Layer </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>
<code>disableSecureDataChannelDefaults</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.4: FTPS
only</strong>: Whether or not to disable using default values for
<code>execPbsz</code> and <code>execProt</code> when using secure data
transfer. You can set this option to <code>true</code> if you want to be in
absolute full control what the options <code>execPbsz</code> and
<code>execProt</code> should be used. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>download</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong>
Whether the FTP consumer should download the file. If this option is set to
<code>false</code>
, then the message body will be <code>null</code>, but the consumer will still
trigger a Camel <a shape="rect" href="exchange.html">Exchange</a> that has
details about the file such as file name, file size, etc. It's just that the
file will not be downloaded. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> streamDownload<br clear="none"
class="atl-forced-newline"> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> false </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>Camel 2.11:</strong> Whether the consumer
should download the entire file up front, the default behavior, or if it should
pass an InputStream read from the remote resource rather than an in-memory
array as the in body of the Camel <a shape="rect"
href="exchange.html">Exchange</a>.  This option is ignored if
download is false or is localWorkDirectory is provided.  This
option is useful for working with large remote files. </p>
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>execProt</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>Camel 2.4: FTPS only</strong>: Will by default
use option <code>P</code> if secure data channel defaults hasn't been disabled.
Possible values are: <br clear="none" class="atl-forced-newline">
-<code>C</code>: Clear <br clear="none" class="atl-forced-newline">
-<code>S</code>: Safe (SSL protocol only) <br clear="none"
class="atl-forced-newline">
-<code>E</code>: Confidential (SSL protocol only) <br clear="none"
class="atl-forced-newline">
-<code>P</code>: Private </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>execPbsz</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <strong>Camel 2.4: FTPS only</strong>:
This option specifies the buffer size of the secure data channel. If option
<code>useSecureDataChannel</code> has been enabled and this option has not been
explicit set, then value <code>0</code> is used. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>isImplicit</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>false</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>FTPS only:</strong> Sets the security
mode(implicit/explicit). Default is explicit (<code>false</code>).
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>knownHostsFile</code> </p></td><td colspan="1" rowspan="1" class="
confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>SFTP only:</strong> Sets the
<code>known_hosts</code> file, so that the SFTP endpoint can do host key
verification. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>knownHostsUri</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <strong>SFTP only:</strong> <strong>Camel
2.11.1:</strong> Sets the <code>known_hosts</code> file (loaded from classpath
by default), so that the SFTP endpoint can do host key verification.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>keyPair</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>SFTP only:</strong> <strong>Camel
2.12.0:</strong> Sets the Java KeyPair for SSH public key authenticat
ion, it supports DSA or RSA keys. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>privateKeyFile</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>SFTP only:</strong>
Set the private key file to that the SFTP endpoint can do private key
verification. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>privateKeyUri</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <strong>SFTP only:</strong> <strong>Camel
2.11.1:</strong> Set the private key file (loaded from classpath by default) to
that the SFTP endpoint can do private key verification. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>privateKey</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code>
</p></td><td cols
pan="1" rowspan="1" class="confluenceTd"><p> <strong>SFTP only:</strong>
<strong>Camel 2.11.1:</strong> Set the private key as byte[] to that the SFTP
endpoint can do private key verification. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>privateKeyFilePassphrase</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>SFTP
only:</strong> <strong>Deprecated:</strong> use
<code>privateKeyPassphrase</code> instead. Set the private key file passphrase
to that the SFTP endpoint can do private key verification.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>privateKeyPassphrase</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>SFTP only:</strong> <strong>Camel
2.11.1:</strong> Set the private key file passphrase to that the
SFTP endpoint can do private key verification. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>
<code>preferredAuthentications</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>SFTP only:</strong> <strong>Camel 2.10.7,
2.11.2,2.12.0:</strong> set the preferred authentications which SFTP endpoint
will used. Some example include:password,publickey. If not specified the
default list from JSCH will be used. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>ciphers</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8.2, 2.9: SFTP
only</strong> Set a comma 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. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>fastExistsCheck</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>false</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>Camel 2.8.2, 2.9:</strong> 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 <strong>Camel 2.10.1</strong> onwards this option
also influences <code>readLock=changed</code> to control whether 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. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>strictHostKeyChecking</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>no</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>SFTP only:</strong>
<strong>Camel 2.2:</strong> Sets whether to use strict host key checking.
Possible values are: <code>no</code>, <code>yes</code> and <code>ask</code>.
<code>ask</code> does not make sense to use as Camel cannot answer the question
for you as its meant for human intervention. <strong>Note:</strong> The default
in Camel 2.1 and below was <code>ask</code>. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>maximumReconnectAttempts</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>3</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies the
maximum reconnect attempts Camel performs when it tries to connect to the
remote FTP serv
er. Use 0 to disable this behavior. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>reconnectDelay</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>1000</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> Delay in millis Camel will
wait before performing a reconnect attempt. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>connectTimeout</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>10000</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel
2.4:</strong> Is the connect timeout in millis. This corresponds to using
<code>ftpClient.connectTimeout</code> for the FTP/FTPS. For SFTP this option is
also used when attempting to connect. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>soTimeout</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td
colspan="1" ro
wspan="1" class="confluenceTd"><p> <strong>FTP and FTPS Only:</strong>
<strong>Camel 2.4:</strong> Is the <code>SocketOptions.SO_TIMEOUT</code> value
in millis. Note SFTP will automatic use the <code>connectTimeout</code> as the
<code>soTimeout</code>. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>timeout</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>30000</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTP and FTPS
Only:</strong> <strong>Camel 2.4:</strong> Is the data timeout in millis. This
corresponds to using <code>ftpClient.dataTimeout</code> for the FTP/FTPS. For
SFTP there is no data timeout. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>throwExceptionOnConnectFailed</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>false</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>Camel 2.5:</strong> Whether or not
to thrown an exception if a successful connection and login could not be
establish. This allows a custom <code>pollStrategy</code> to deal with the
exception, for example to stop the consumer or the likes. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>siteCommand</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTP and
FTPS Only:</strong> <strong>Camel 2.5:</strong> To execute site commands after
successful login. Multiple site commands can be separated using a new line
character (\n). Use <code>help site</code> to see which site commands your FTP
server supports. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>stepwise</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <strong>Camel 2.6:</strong> 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. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>separator</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>Auto</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <strong>Camel 2.6:</strong> Dictates what
path separator char to use when uploading files. <code>Auto</code> = Use the
path provided without altering it. <code>UNIX</code> = Use unix style path
separators. <code>Windows</code> = Use Windows style path separators.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>chmod</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>SFTP Producer Only:</strong> <strong>Camel
2.9:</strong> Allows you to se
t chmod on the stored file. For example <code>chmod=640</code>.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>compression</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> 0 </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>SFTP Only:</strong> <strong>Camel
2.8.3/2.9:</strong> To use compression. Specify a level from 1 to 10.
<strong>Important:</strong> You must manually add the needed JSCH zlib JAR to
the classpath for compression support. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>ftpClient</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTP and FTPS
Only:</strong> <strong>Camel 2.1:</strong> Allows you to use a custom
<code>org.apache.commons.net.ftp.FTPClient</code> instance.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>ftpClientConfig</c
ode> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<strong>FTP and FTPS Only:</strong> <strong>Camel 2.1:</strong> Allows you to
use a custom <code>org.apache.commons.net.ftp.FTPClientConfig</code> instance.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>serverAliveInterval</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>0</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>SFTP Only:</strong> <strong>Camel 2.8</strong>
Allows you to set the serverAliveInterval of the sftp session
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>serverAliveCountMax</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>1</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>SFTP Only:</strong> <strong>Camel 2.8</strong>
Allows you to set the serverAliveCo
untMax of the sftp session </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>ftpClient.trustStore.file</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTPS Only:</strong>
Sets the trust store file, so that the FTPS client can look up for trusted
certificates. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>ftpClient.trustStore.type</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>JKS</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTPS Only:</strong>
Sets the trust store type. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>ftpClient.trustStore.algorithm</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>SunX509</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>FTPS Only:</strong> Sets t
he trust store algorithm. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>ftpClient.trustStore.password</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTPS
Only:</strong> Sets the trust store password. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>ftpClient.keyStore.file</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTPS
Only:</strong> Sets the key store file, so that the FTPS client can look up for
the private certificate. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>ftpClient.keyStore.type</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>JKS</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTPS Only:</strong>
Sets the ke
y store type. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>ftpClient.keyStore.algorithm</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>SunX509</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTPS
Only:</strong> Sets the key store algorithm. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>ftpClient.keyStore.password</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTPS
Only:</strong> Sets the key store password. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>
<code>ftpClient.keyStore.keyPassword</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <strong>FTPS Only:</strong> Sets the
private key password. </p></td></tr><tr><td colspan="1" rowspa
n="1" class="confluenceTd"><p> <code>sslContextParameters</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTPS Only:</strong>
<strong>Camel 2.9:</strong> Reference to a
<code>org.apache.camel.util.jsse.SSLContextParameters</code> in the <a
shape="rect" class="external-link"
href="http://camel.apache.org/registry.html">Registry</a>.  This reference
overrides any configured SSL related options on ftpClient as well as the
securityProtocol (SSL, TLS, etc.) set on FtpsConfiguration.  See <a
shape="rect" href="camel-configuration-utilities.html">Using the JSSE
Configuration Utility</a>. </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>proxy</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> <strong>SFTP Only:</strong> <strong>Camel
2.10.7, 2.11.1:<
/strong> Reference to a <code>com.jcraft.jsch.Proxy</code> in the <a
shape="rect" class="external-link"
href="http://camel.apache.org/registry.html">Registry</a>.  This proxy is
used to consume/send messages from the target SFTP host. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> <code>useList</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>FTP/FTPS
Only:</strong> <strong>Camel 2.12.1:</strong> Whether the consumer should use
FTP LIST command to retrieve directory listing to see which files exists. If
this option is set to <code>false</code>, then <code>stepwise=false</code> must
be configured, and also <code>fileName</code> must be configured to a fixed
name, so the consumer knows the name of the file to retrieve. When doing this
only that single file can be retrieved. See further below for more details.
</p></td></tr><tr><td colspan="1" rowspan
="1" class="confluenceTd"><p> <code>ignoreFileNotFoundOrPermissionError</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>false</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>Camel 2.12.1:</strong> Whether the consumer
should ignore when a file was attempted to be retrieved but did not exist (for
some reason), or failure due insufficient file permission error.
</p></td></tr></tbody></table></div>
-</div>
-
- <div class="aui-message hint shadowed information-macro">
+<div class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>username</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the username to use
to log in to the remote file systen.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>password</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the password to use
to log in to the remote file system.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>binary</code></p></td><td c
olspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the file transfer
mode, BINARY or ASCII. Default is ASCII
(<code>false</code>).</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>disconnect</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> 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.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>localWorkDirectory</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><
p>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 consume a very big remote file and thus can conserve
memory. See below for more details.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>passiveMode</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>FTP and FTPS
only</strong>: Specifies whether to use passive mode connections. Default is
active mode (<code>false</code>).</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>securityProtocol</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>TLS</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>FTPS only:</strong> Sets the
underlying security protocol. The following values are defined: <br
clear="none" class="at
l-forced-newline"> <code>TLS</code>: Transport Layer Security <br clear="none"
class="atl-forced-newline"> <code>SSL</code>: Secure Sockets
Layer</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>disableSecureDataChannelDefaults</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4: FTPS
only</strong>: Whether or not to disable using default values for
<code>execPbsz</code> and <code>execProt</code> when using secure data
transfer. You can set this option to <code>true</code> if you want to be in
absolute full control what the options <code>execPbsz</code> and
<code>execProt</code> should be used.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>download</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong>
Whether the FTP consumer should download the file. If this option is set to
<code>false</code>, then the message body will be <code>null</code>, but the
consumer will still trigger a Camel <a shape="rect"
href="exchange.html">Exchange</a> that has details about the file such as file
name, file size, etc. It's just that the file will not be
downloaded.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>streamDownload</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.11:</strong> Whether the consumer
should download the entire file up front, the default behavior, or if it should
pass an InputStream read from the remote resource rather than an in-memory
array as the in body of the Camel <a shape="rect"
href="exchange.html">Exchange</a>.  This option is ignored if
download is false or is localWorkDirectory is provided.  This
option is use
ful for working with large remote files.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>execProt</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4: FTPS
only</strong>: Will by default use option <code>P</code> if secure data channel
defaults hasn't been disabled. Possible values are: <br clear="none"
class="atl-forced-newline"> <code>C</code>: Clear <br clear="none"
class="atl-forced-newline"> <code>S</code>: Safe (SSL protocol only) <br
clear="none" class="atl-forced-newline"> <code>E</code>: Confidential (SSL
protocol only) <br clear="none" class="atl-forced-newline"> <code>P</code>:
Private</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>execPbsz</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Camel 2.4: FTPS on
ly</strong>: This option specifies the buffer size of the secure data channel.
If option <code>useSecureDataChannel</code> has been enabled and this option
has not been explicit set, then value <code>0</code> is
used.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>isImplicit</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>FTPS only:</strong> Sets the
security mode(implicit/explicit). Default is explicit
(<code>false</code>).</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>knownHostsFile</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>SFTP only:</strong> Sets the
<code>known_hosts</code> file, so that the SFTP endpoint can do host key
verification.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>
knownHostsUri</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>SFTP only:</strong> <strong>Camel
2.11.1:</strong> Sets the <code>known_hosts</code> file (loaded from classpath
by default), so that the SFTP endpoint can do host key
verification.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>keyPair</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>SFTP only:</strong> <strong>Camel
2.12.0:</strong> Sets the Java KeyPair for SSH public key authentication, it
supports DSA or RSA keys.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>privateKeyFile</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>SFTP only:</strong> Set the priv
ate key file to that the SFTP endpoint can do private key
verification.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>privateKeyUri</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>SFTP only:</strong> <strong>Camel
2.11.1:</strong> Set the private key file (loaded from classpath by default) to
that the SFTP endpoint can do private key verification.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>privateKey</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>SFTP only:</strong> <strong>Camel
2.11.1:</strong> Set the private key as byte[] to that the SFTP endpoint can do
private key verification.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>privateKeyFilePassphrase</code></p></td><td
colspan="1" row
span="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>SFTP only:</strong>
<strong>Deprecated:</strong> use <code>privateKeyPassphrase</code> instead. Set
the private key file passphrase to that the SFTP endpoint can do private key
verification.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>privateKeyPassphrase</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>SFTP only:</strong>
<strong>Camel 2.11.1:</strong> Set the private key file passphrase to that the
SFTP endpoint can do private key verification.</p></td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code>preferredAuthentications</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>SFTP only:</strong>
<strong>Camel 2.10.
7, 2.11.2,2.12.0:</strong> set the preferred authentications which SFTP
endpoint will used. Some example include:password,publickey. If not specified
the default list from JSCH will be used.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>ciphers</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8.2, 2.9: SFTP
only</strong> Set a comma 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.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>fastExistsCheck</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"
><p><code>false</code></p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p><strong>Camel 2.8.2, 2.9:</strong> 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 <strong>Camel 2.10.1</strong> onwards
>this option also influences <code>readLock=changed</code> to control whether
>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.</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><code>strictHostKeyChecking</code></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p><code>no</code></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p><strong>SFTP only:</strong>
><strong>Camel 2.2:</strong> Sets whether to use strict host key checking.
Possible values are: <code>no</code>, <code>yes</code> and <code>ask</code>.
<code>ask</code> does not make sense to use as Camel cannot answer the question
for you as its meant for human intervention. <strong>Note:</strong> The default
in Camel 2.1 and below was <code>ask</code>.</p></td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code>maximumReconnectAttempts</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>3</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the maximum reconnect
attempts Camel performs when it tries to connect to the remote FTP server. Use
0 to disable this behavior.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>reconnectDelay</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Delay in millis Camel will wait before
performing a reconnect attempt.</p></td></tr><tr><td colspa
n="1" rowspan="1"
class="confluenceTd"><p><code>connectTimeout</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>10000</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> Is the connect
timeout in millis. This corresponds to using
<code>ftpClient.connectTimeout</code> for the FTP/FTPS. For SFTP this option is
also used when attempting to connect.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>soTimeout</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>FTP and FTPS
Only:</strong> <strong>Camel 2.4:</strong> Is the
<code>SocketOptions.SO_TIMEOUT</code> value in millis. Note SFTP will automatic
use the <code>connectTimeout</code> as the
<code>soTimeout</code>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>timeout</code></p></td><td colspan="1"
rowspan="1" class="c
onfluenceTd"><p><code>30000</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>FTP and FTPS Only:</strong> <strong>Camel
2.4:</strong> Is the data timeout in millis. This corresponds to using
<code>ftpClient.dataTimeout</code> for the FTP/FTPS. For SFTP there is no data
timeout.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>throwExceptionOnConnectFailed</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong>
Whether or not to thrown an exception if a successful connection and login
could not be establish. This allows a custom <code>pollStrategy</code> to deal
with the exception, for example to stop the consumer or the
likes.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>siteCommand</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="
1" rowspan="1" class="confluenceTd"><p><strong>FTP and FTPS Only:</strong>
<strong>Camel 2.5:</strong> To execute site commands after successful login.
Multiple site commands can be separated using a new line character (\n). Use
<code>help site</code> to see which site commands your FTP server
supports.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>stepwise</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>Camel 2.6:</strong> 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.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>separator</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>Auto</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd">
<p><strong>Camel 2.6:</strong> Dictates what path separator char to use when
uploading files. <code>Auto</code> = Use the path provided without altering it.
<code>UNIX</code> = Use unix style path separators. <code>Windows</code> = Use
Windows style path separators.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>chmod</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>SFTP Producer Only:</strong> <strong>Camel
2.9:</strong> Allows you to set chmod on the stored file. For example
<code>chmod=640</code>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>compression</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>0</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>SFTP Only:</strong> <strong>Camel
2.8.3/2.9:</strong> To use compression. Specify a level from 1 to 10.
<strong>Important:</strong> You
must manually add the needed JSCH zlib JAR to the classpath for compression
support.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>ftpClient</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>FTP and FTPS Only:</strong>
<strong>Camel 2.1:</strong> Allows you to use a custom
<code>org.apache.commons.net.ftp.FTPClient</code>
instance.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>ftpClientConfig</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>FTP and FTPS Only:</strong>
<strong>Camel 2.1:</strong> Allows you to use a custom
<code>org.apache.commons.net.ftp.FTPClientConfig</code>
instance.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>serverAliveInterval</code></p></td><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>SFTP Only:</strong> <strong>Camel 2.8</strong>
Allows you to set the serverAliveInterval of the sftp
session</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>serverAliveCountMax</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>1</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>SFTP Only:</strong>
<strong>Camel 2.8</strong> Allows you to set the serverAliveCountMax of the
sftp session</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>ftpClient.trustStore.file</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>FTPS Only:</strong>
Sets the trust store file, so that the FTPS client can look up for trusted
certificates.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceT
d"><p><code>ftpClient.trustStore.type</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>JKS</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>FTPS Only:</strong> Sets the trust
store type.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>ftpClient.trustStore.algorithm</code></p></td><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>SunX509</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>FTPS Only:</strong> Sets the trust
store algorithm.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>ftpClient.trustStore.password</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>FTPS Only:</strong>
Sets the trust store password.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>ftpClient.keyStore.file</code></p></td><td
colspan="1" rowspan
="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>FTPS Only:</strong> Sets the key
store file, so that the FTPS client can look up for the private
certificate.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>ftpClient.keyStore.type</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>JKS</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>FTPS Only:</strong>
Sets the key store type.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>ftpClient.keyStore.algorithm</code></p></td><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>SunX509</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>FTPS Only:</strong> Sets the key
store algorithm.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>ftpClient.keyStore.password</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"
><p><code>null</code></p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p><strong>FTPS Only:</strong> Sets the key store
>password.</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><code>ftpClient.keyStore.keyPassword</code></p></td><td
> colspan="1" rowspan="1"
>class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p><strong>FTPS Only:</strong> Sets the private key
>password.</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p><code>sslContextParameters</code></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p><strong>FTPS Only:</strong>
><strong>Camel 2.9:</strong> Reference to a
><code>org.apache.camel.util.jsse.SSLContextParameters</code> in the <a
>shape="rect" class="external-link"
>href="http://camel.apache.org/registry.html">Registry</a>.  This
>reference overrides any configured SSL related options on ft
pClient as well as the securityProtocol (SSL, TLS, etc.) set on
FtpsConfiguration.  See <a shape="rect"
href="camel-configuration-utilities.html">Using the JSSE Configuration
Utility</a>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>proxy</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>SFTP Only:</strong> <strong>Camel 2.10.7,
2.11.1:</strong> Reference to a <code>com.jcraft.jsch.Proxy</code> in the <a
shape="rect" class="external-link"
href="http://camel.apache.org/registry.html">Registry</a>.  This proxy is
used to consume/send messages from the target SFTP host.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>useList</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><strong>FTP/FTPS Only:</strong>
<strong>Camel 2.12.1
:</strong> Whether the consumer should use FTP LIST command to retrieve
directory listing to see which files exists. If this option is set to
<code>false</code>, then <code>stepwise=false</code> must be configured, and
also <code>fileName</code> must be configured to a fixed name, so the consumer
knows the name of the file to retrieve. When doing this only that single file
can be retrieved. See further below for more details.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>ignoreFileNotFoundOrPermissionError</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12.1:</strong>
Whether the consumer should ignore when a file was attempted to be retrieved
but did not exist (for some reason), or failure due insufficient file
permission error. <strong>Camel 2.14.2:</strong> This option now applies to
directories as well.</p></td></tr></tbody></table></div>
</div> <div class="aui-message hint shadowed information-macro">
<p class="title">FTPS component default trust store</p>
<span class="aui-icon icon-hint">Icon</span>
<div class="message-content">
-
-<p>When using the <code>ftpClient.</code> 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
<code>ftpClient.trustStore.xxx</code> options or by configuring a custom
<code>ftpClient</code>.</p>
-
-<p>When using <code>sslContextParameters</code>, the trust store is managed by
the configuration of the provided SSLContextParameters instance.</p>
+ <p>When using the <code>ftpClient.</code>
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 <code>ftpClient.trustStore.xxx</code>
options or by configuring a custom <code>ftpClient</code>.</p><p>When using
<code>sslContextParameters</code>, the trust store is managed by the
configuration of the provided SSLContextParameters instance.</p>
</div>
</div>
-
-
-<p>You can configure additional options on the <code>ftpClient</code> and
<code>ftpClientConfig</code> from the URI directly by using the
<code>ftpClient.</code> or <code>ftpClientConfig.</code> prefix.</p>
-
-<p>For example to set the <code>setDataTimeout</code> on the
<code>FTPClient</code> to 30 seconds you can do:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
-from("ftp://foo@myserver?password=secret&ftpClient.dataTimeout=30000").to("bean:foo");
+<p>You can configure additional options on the <code>ftpClient</code> and
<code>ftpClientConfig</code> from the URI directly by using the
<code>ftpClient.</code> or <code>ftpClientConfig.</code> prefix.</p><p>For
example to set the <code>setDataTimeout</code> on the <code>FTPClient</code> to
30 seconds you can do:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[from("ftp://foo@myserver?password=secret&ftpClient.dataTimeout=30000").to("bean:foo");
]]></script>
-</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 pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
-from("ftp://foo@myserver?password=secret&ftpClient.dataTimeout=30000&ftpClientConfig.serverLanguageCode=fr").to("bean:foo");
+</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 pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[from("ftp://foo@myserver?password=secret&ftpClient.dataTimeout=30000&ftpClientConfig.serverLanguageCode=fr").to("bean:foo");
]]></script>
-</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 <code>ftpClient</code> or <code>ftpClientConfig</code> to use by
letting Camel lookup in the <a shape="rect" href="registry.html">Registry</a>
for it.</p>
-
-<p>For example:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
- <bean id="myConfig"
class="org.apache.commons.net.ftp.FTPClientConfig">
+</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 <code>ftpClient</code> or
<code>ftpClientConfig</code> to use by letting Camel lookup in the <a
shape="rect" href="registry.html">Registry</a> for it.</p><p>For
example:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[ <bean id="myConfig"
class="org.apache.commons.net.ftp.FTPClientConfig">
<property name="lenientFutureDates"
value="true"/>
<property name="serverLanguageCode"
value="fr"/>
</bean>
]]></script>
-</div></div>
-
-<p>And then let Camel lookup this bean when you use the # notation in the
url.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
-from("ftp://foo@myserver?password=secret&ftpClientConfig=#myConfig").to("bean:foo");
+</div></div><p>And then let Camel lookup this bean when you use the # notation
in the url.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[from("ftp://foo@myserver?password=secret&ftpClientConfig=#myConfig").to("bean:foo");
]]></script>
-</div></div>
-
-
-<h3 id="FTP-MoreURIoptions">More URI options</h3>
- <div class="aui-message hint shadowed information-macro">
+</div></div><h3 id="FTP-MoreURIoptions">More URI options</h3> <div
class="aui-message hint shadowed information-macro">
<span class="aui-icon icon-hint">Icon</span>
<div class="message-content">
-
-<p>See <a shape="rect" href="file2.html">File2</a> as all the options there
also applies for this component.</p>
+ <p>See <a shape="rect" href="file2.html">File2</a>
as all the options there also applies for this component.</p>
</div>
</div>
-
-
-
-<h3 id="FTP-Examples">Examples</h3>
-
-<p><code><a shape="rect" class="external-link"
href="ftp://[email protected]/public/upload/images/holiday2008?password=secret&binary=true"
rel="nofollow">ftp://[email protected]/public/upload/images/holiday2008?password=secret&binary=true</a></code><br
clear="none">
-<code><a shape="rect" class="external-link"
href="ftp://[email protected]:12049/reports/2008/password=secret&binary=false"
rel="nofollow">ftp://[email protected]:12049/reports/2008/password=secret&binary=false</a></code><br
clear="none">
-<code><a shape="rect" class="external-link"
href="ftp://publicftpserver.com/download"
rel="nofollow">ftp://publicftpserver.com/download</a></code></p>
-
- <div class="aui-message problem shadowed information-macro">
+<h3 id="FTP-Examples">Examples</h3><p><code><a shape="rect"
class="external-link"
href="ftp://[email protected]/public/upload/images/holiday2008?password=secret&binary=true"
rel="nofollow">ftp://[email protected]/public/upload/images/holiday2008?password=secret&binary=true</a></code><br
clear="none"> <code><a shape="rect" class="external-link"
href="ftp://[email protected]:12049/reports/2008/password=secret&binary=false"
rel="nofollow">ftp://[email protected]:12049/reports/2008/password=secret&binary=false</a></code><br
clear="none"> <code><a shape="rect" class="external-link"
href="ftp://publicftpserver.com/download"
rel="nofollow">ftp://publicftpserver.com/download</a></code></p> <div
class="aui-message problem shadowed information-macro">
<p class="title">FTP Consumer does not support
concurrency</p>
<span class="aui-icon icon-problem">Icon</span>
<div class="message-content">
-
-<p>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>
-
-<p>The FTP producer does <strong>not</strong> have this issue, it supports
concurrency.</p>
+ <p>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><p>The FTP producer does <strong>not</strong> have this issue, it
supports concurrency.</p>
</div>
</div>
-
-
<div class="aui-message success shadowed information-macro">
<p class="title">More information</p>
<span class="aui-icon icon-success">Icon</span>
<div class="message-content">
-
-<p>This component is an extension of the <a shape="rect"
href="file2.html">File</a> component. So there are more samples and details on
the <a shape="rect" href="file2.html">File</a> component page.</p>
+ <p>This component is an extension of the <a
shape="rect" href="file2.html">File</a> component. So there are more samples
and details on the <a shape="rect" href="file2.html">File</a> component
page.</p>
</div>
</div>
-
-
-<h3 id="FTP-Defaultwhenconsumingfiles">Default when consuming files</h3>
-
-<p>The <a shape="rect" href="ftp2.html">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 <code>delete=true</code> to delete the files, or use
<code>move=.done</code> to move the files into a hidden done sub directory.</p>
-
-<p>The regular <a shape="rect" href="file2.html">File</a> consumer is
different as it will by default move files to a <code>.camel</code> sub
directory. The reason Camel does <strong>not</strong> 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>
-
-<h4 id="FTP-limitations">limitations</h4>
-
-<p>The option <strong>readLock</strong> can be used to force Camel
<strong>not</strong> 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">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>
-
-<p>When moving files using <code>move</code> or <code>preMove</code> 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 id="FTP-MessageHeaders">Message Headers</h3>
-
-<p>The following message headers can be used to affect the behavior of the
component</p>
-
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p> Description
</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>CamelFileName</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> 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. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>CamelFileNameProduced</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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. </p></td></tr><tr><td colspan="1" rowspa
n="1" class="confluenceTd"><p> <code>CamelFileBatchIndex</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> Current index out of total
number of files being consumed in this batch. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>CamelFileBatchSize</code>
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Total number of
files being consumed in this batch. </p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> <code>CamelFileHost</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> The remote hostname.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>CamelFileLocalWorkPath</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Path to the local work file, if local work directory
is used. </p></td></tr></tbody></table></div>
-</div>
-
-<p>In addition the FTP/FTPS consumer and producer will enrich the Camel
<code>Message</code> with the following headers</p>
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p> Description
</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
<code>CamelFtpReplyCode</code> </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> <strong>Camel 2.11.1:</strong> The FTP client reply
code (the type is a integer) </p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> <code>CamelFtpReplyString</code> </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11.1:</strong>
The FTP client reply string </p></td></tr></tbody></table></div>
-</div>
-
-<h3 id="FTP-Abouttimeouts">About timeouts</h3>
-
-<p>The two set of libraries (see top) has different API for setting timeout.
You can use the <code>connectTimeout</code> option for both of them to set a
timeout in millis to establish a network connection. An individual
<code>soTimeout</code> can also be set on the FTP/FTPS, which corresponds to
using <code>ftpClient.soTimeout</code>. Notice SFTP will automatically use
<code>connectTimeout</code> as its <code>soTimeout</code>. The
<code>timeout</code> option only applies for FTP/FTSP as the data timeout,
which corresponds to the <code>ftpClient.dataTimeout</code> value. All timeout
values are in millis.</p>
-
-
-<h3 id="FTP-UsingLocalWorkDirectory">Using Local Work Directory</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
<code>FileOutputStream</code>.</p>
-
-<p>Camel will store to a local file with the same name as the remote file,
though with <code>.inprogress</code> as extension while the file is being
downloaded. Afterwards, the file is renamed to remove the
<code>.inprogress</code> suffix. And finally, when the <a shape="rect"
href="exchange.html">Exchange</a> is complete the local file is deleted.</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 pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
-from("ftp://[email protected]?password=secret&localWorkDirectory=/tmp").to("file://inbox");
+<h3 id="FTP-Defaultwhenconsumingfiles">Default when consuming files</h3><p>The
<a shape="rect" href="ftp2.html">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 <code>delete=true</code> to delete the files, or use
<code>move=.done</code> to move the files into a hidden done sub
directory.</p><p>The regular <a shape="rect" href="file2.html">File</a>
consumer is different as it will by default move files to a <code>.camel</code>
sub directory. The reason Camel does <strong>not</strong> 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><h4 id="FTP-limitations">limitations</h4><p>The option
<strong>readLock</strong> can be used to force Camel <strong>not</strong> 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">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><p>When moving files using <code>move</code> or
<code>preMove</code> 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 id="FTP-MessageHeaders">Message Headers</h3><p>The following
message headers can be used to affect the behavior of the component</p><div
class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Header</p></th><th
colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>CamelFileName</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>CamelFileNameProduced</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>CamelFileBatchIndex</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Current index out of tota
l number of files being consumed in this batch.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>CamelFileBatchSize</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Total number of files being consumed in
this batch.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>CamelFileHost</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>The remote hostname.</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>CamelFileLocalWorkPath</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Path to the local work file, if
local work directory is used.</p></td></tr></tbody></table></div></div><p>In
addition the FTP/FTPS consumer and producer will enrich the Camel
<code>Message</code> with the following headers</p><div
class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Header</p></th><
th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>CamelFtpReplyCode</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11.1:</strong>
The FTP client reply code (the type is a integer)</p></td></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>CamelFtpReplyString</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11.1:</strong>
The FTP client reply string</p></td></tr></tbody></table></div></div><h3
id="FTP-Abouttimeouts">About timeouts</h3><p>The two set of libraries (see top)
has different API for setting timeout. You can use the
<code>connectTimeout</code> option for both of them to set a timeout in millis
to establish a network connection. An individual <code>soTimeout</code> can
also be set on the FTP/FTPS, which corresponds to using
<code>ftpClient.soTimeout</code>. Notice SFTP will automatically use
<code>connec
tTimeout</code> as its <code>soTimeout</code>. The <code>timeout</code> option
only applies for FTP/FTSP as the data timeout, which corresponds to the
<code>ftpClient.dataTimeout</code> value. All timeout values are in
millis.</p><h3 id="FTP-UsingLocalWorkDirectory">Using Local Work
Directory</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 <code>FileOutputStream</code>.</p><p>Camel will store to a
local file with the same name as the remote file, though with
<code>.inprogress</code> as extension while the file is being downloaded.
Afterwards, the file is renamed to remove the <code>.inprogress</code> suffix.
And finally, when the <a shape="rect" href="exchange.html">Exchange</a> is
complete the local file is deleted.</p><p>So if you want to download files from
a remote FTP server and store it as fi
les then you need to route to a file endpoint such as:</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[from("ftp://[email protected]?password=secret&localWorkDirectory=/tmp").to("file://inbox");
]]></script>
-</div></div>
-
- <div class="aui-message success shadowed information-macro">
+</div></div> <div class="aui-message success shadowed information-macro">
<p class="title">Optimization by renaming work file</p>
<span class="aui-icon icon-success">Icon</span>
<div class="message-content">
-
-<p>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 <code>java.io.File</code> handle is then used as the <a
shape="rect" href="exchange.html">Exchange</a> body. The file producer
leverages this fact and can work directly on the work file
<code>java.io.File</code> handle and perform a <code>java.io.File.rename</code>
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.</p>
+ <p>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 <code>java.io.File</code> handle is then
used as the <a shape="rect" href="exchange.html">Exchange</a> body. The file
producer leverages this fact and can work directly on the work file
<code>java.io.File</code> handle and perform a <code>java.io.File.rename</code>
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.</p>
</div>
</div>
-
-
-<h3 id="FTP-Stepwisechangingdirectories">Stepwise changing directories</h3>
-
-<p>Camel <a shape="rect" href="ftp2.html">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"><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"><li>before 2.5 not stepwise</li><li>2.5
stepwise</li></ul>
-
-
-<p>From Camel 2.6 onwards there is now an option <code>stepwise</code> 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 <code>"/"</code>.</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 pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
-/
+<h3 id="FTP-Stepwisechangingdirectories">Stepwise changing
directories</h3><p>Camel <a shape="rect" href="ftp2.html">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"><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"><li>before 2.5 not stepwise</li><li>2.5
stepwise</li></ul><p>From Camel 2.6 onwards there is now an option
<code>stepwise</code> 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 repor
ted as <code>"/"</code>.</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 pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[/
/one
/one/two
/one/two/sub-a
/one/two/sub-b
]]></script>
-</div></div>
-
-<p>And that we have a file in each of sub-a (a.txt) and sub-b (b.txt)
folder.</p>
-
-<h4 id="FTP-Usingstepwise=true(defaultmode)">Using stepwise=true (default
mode)</h4>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
-TYPE A
+</div></div><p>And that we have a file in each of sub-a (a.txt) and sub-b
(b.txt) folder.</p><h4 id="FTP-Usingstepwise=true(defaultmode)">Using
stepwise=true (default mode)</h4><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[TYPE A
200 Type set to A
PWD
257 "/" is current directory.
@@ -429,14 +262,8 @@ QUIT
221 Goodbye
disconnected.
]]></script>
-</div></div>
-
-<p>As you can see when stepwise is enabled, it will traverse the directory
structure using CD xxx.</p>
-
-<h4 id="FTP-Usingstepwise=false">Using stepwise=false</h4>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
-230 Logged on
+</div></div><p>As you can see when stepwise is enabled, it will traverse the
directory structure using CD xxx.</p><h4 id="FTP-Usingstepwise=false">Using
stepwise=false</h4><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[230 Logged on
TYPE A
200 Type set to A
SYST
@@ -475,14 +302,7 @@ QUIT
221 Goodbye
disconnected.
]]></script>
-</div></div>
-
-<p>As you can see when not using stepwise, there are no CD operation invoked
at all.</p>
-
-<h3 id="FTP-Samples">Samples</h3>
-
-<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 pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+</div></div><p>As you can see when not using stepwise, there are no CD
operation invoked at all.</p><h3 id="FTP-Samples">Samples</h3><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 pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@@ -503,42 +323,23 @@ protected RouteBuilder createRouteBuilde
};
}
]]></script>
-</div></div>
-
-<p>And the route using Spring DSL:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false"
type="syntaxhighlighter"><![CDATA[
- <route>
+</div></div><p>And the route using Spring DSL:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false"
type="syntaxhighlighter"><![CDATA[ <route>
<from
uri="ftp://scott@localhost/public/reports?password=tiger&amp;binary=true&amp;delay=60000"/>
<to uri="file://target/test-reports"/>
</route>
]]></script>
-</div></div>
-
-<h4
id="FTP-ConsumingaremoteFTPSserver(implicitSSL)andclientauthentication">Consuming
a remote FTPS server (implicit SSL) and client authentication</h4>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
-from("ftps://admin@localhost:2222/public/camel?password=admin&securityProtocol=SSL&isImplicit=true
+</div></div><h4
id="FTP-ConsumingaremoteFTPSserver(implicitSSL)andclientauthentication">Consuming
a remote FTPS server (implicit SSL) and client authentication</h4><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[from("ftps://admin@localhost:2222/public/camel?password=admin&securityProtocol=SSL&isImplicit=true
&ftpClient.keyStore.file=./src/test/resources/server.jks
&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password")
.to("bean:foo");
]]></script>
-</div></div>
-
-<h4
id="FTP-ConsumingaremoteFTPSserver(explicitTLS)andacustomtruststoreconfiguration">Consuming
a remote FTPS server (explicit TLS) and a custom trust store configuration</h4>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[
-from("ftps://admin@localhost:2222/public/camel?password=admin&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.password=password")
+</div></div><h4
id="FTP-ConsumingaremoteFTPSserver(explicitTLS)andacustomtruststoreconfiguration">Consuming
a remote FTPS server (explicit TLS) and a custom trust store
configuration</h4><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false"
type="syntaxhighlighter"><![CDATA[from("ftps://admin@localhost:2222/public/camel?password=admin&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.password=password")
.to("bean:foo");
]]></script>
-</div></div>
-
-<h3
id="FTP-Filterusingorg.apache.camel.component.file.GenericFileFilter">Filter
using <code>org.apache.camel.component.file.GenericFileFilter</code></h3>
-
-<p>Camel supports pluggable filtering strategies. This strategy it to use the
build in <code>org.apache.camel.component.file.GenericFileFilter</code> 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 built our own filter that only accepts files starting
with report in the filename.</p>
[... 122 lines stripped ...]