You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2013/02/08 21:35:05 UTC
svn commit: r1444219 [10/20] - in /servicemix/site/production/docs/4.4.x: ./
activemq/ architecture/ camel/ camel/deployment/ commands/
developers-guide/ images/ jbi/ jbi/components/ karaf/developers-guide/
karaf/users-guide/ nmr/ quickstart/ user/ use...
Modified: servicemix/site/production/docs/4.4.x/jbi/components/servicemix-file.html
URL: http://svn.apache.org/viewvc/servicemix/site/production/docs/4.4.x/jbi/components/servicemix-file.html?rev=1444219&r1=1444218&r2=1444219&view=diff
==============================================================================
--- servicemix/site/production/docs/4.4.x/jbi/components/servicemix-file.html (original)
+++ servicemix/site/production/docs/4.4.x/jbi/components/servicemix-file.html Fri Feb 8 20:35:02 2013
@@ -118,7 +118,7 @@
<p>JBI 1.0 support is available in Apache ServiceMix 4 to allow existing users to migrate more easily to this latest version - if you're a new user, you should consider JBI deprecated and not use it for your project.
Take a look at our <a href="../../users-guide/getting-started/technology-selection.html"</a>technology selection guidelines</a> for more information.</p>
</div>
- <h2 id="servicemixfile">servicemix-file</h2><h3 id="Overview">Overview</h3><p>The ServiceMix File component provides JBI integration to the file system. It can be used to read & write files via URI or to periodically poll directories for new files.</p><h4 id="Namespaceandxbean.xml">Namespace and xbean.xml</h4><p>The namespace URI for the servicemix-bean JBI component is <tt>http://servicemix.apache.org/file/1.0</tt>. This is an example of an <tt>xbean.xml</tt> file with a namespace definition with prefix <tt>bean</tt>.</p><div class="syntax"><div class="highlight"><pre><span class="nt"><beans</span> <span class="na">xmlns:file=</span><span class="s">"http://servicemix.apache.org/file/1.0"</span><span class="nt">></span>

 <span class="c"><!-- add file:poller and file:sender definitions here --></span>

<span class="nt"></beans></span>
</pre></div>
</div><h4 id="Endpointtypes">Endp
oint types</h4><p>The servicemix-file component defines two endpoint type:</p><ul style="list-style: square"><li><tt>file:poller</tt> :: Periodically polls a directory for files and sends an exchange for every file</li><li><tt>file:sender</tt> :: Writes the contents of an exchange to a file</li></ul><h3 id="filepoller"><tt>file:poller</tt></h3><h4 id="Endpointproperties">Endpoint properties</h4><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Property Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> archive </td><td class="confluenceTd"> <em>java.io.File</em> </td><td class="confluenceTd"> Specifies a directory relative to the polling directory to which processed files are archived. </td></tr><tr><td class="confluenceTd"> autoCreateDirectory </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint should create the tar
get directory, if it does not already exist. If you set this to <code>false</code> and the directory does not exist, the endpoint will not do anything. Default value is <code>true</code>. </td></tr><tr><td class="confluenceTd"> comparator </td><td class="confluenceTd"> <em>java.util.Comparator</em> </td><td class="confluenceTd"> Specifies a <code>Comparator</code> which will be used to sort File listing before starting to process. The default is null, means no sorting. <code>Comparator</code> objects are implementations of <code>java.util.Comparator</code>. </td></tr><tr><td class="confluenceTd"> component </td><td class="confluenceTd"> <em><a href="#org.apache.servicemix.common.DefaultComponenttypes">org.apache.servicemix.common.DefaultComponent</a></em> </td><td class="confluenceTd"> </td></tr><tr><td class="confluenceTd"> concurrentPolling </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Sets whether more than o
ne poll can be active at a time (true means yes). Default value is <code>false</code>. </td></tr><tr><td class="confluenceTd"> delay </td><td class="confluenceTd"> <em>long</em> </td><td class="confluenceTd"> Sets the amount of time in milliseconds that the endpoint should wait before making the first poll. </td></tr><tr><td class="confluenceTd"> deleteFile </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if files should be deleted after they are processed. Default value is <code>true</code>. </td></tr><tr><td class="confluenceTd"> endpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> The name of the endpoint. </td></tr><tr><td class="confluenceTd"> file </td><td class="confluenceTd"> <em>java.io.File</em> </td><td class="confluenceTd"> Specifies the file or directory to be polled. If it is a directory, all files in the directory or its sub-directories will be processed by the endp
oint. If it is a file, only files matching the filename will be processed." </td></tr><tr><td class="confluenceTd"> filter </td><td class="confluenceTd"> <em>java.io.FileFilter</em> </td><td class="confluenceTd"> Bean defining the class implementing the file filtering strategy. This bean must be an implementation of the <code>java.io.FileFilter</code> interface. </td></tr><tr><td class="confluenceTd"> firstTime </td><td class="confluenceTd"> <em>java.util.Date</em> </td><td class="confluenceTd"> Sets the date on which the first poll will be executed. If a delay is also set using <code>setDelay</code>, the delay interval will be added after the date specified. </td></tr><tr><td class="confluenceTd"> interfaceName </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the interface exposed by the endpoint. </td></tr><tr><td class="confluenceTd"> lockManager </td><td class="confluenceTd"> <em>org.apache
.servicemix.common.locks.LockManager</em> </td><td class="confluenceTd"> Bean defining the class implementing the file locking strategy. This bean must be an implementation of the <code>org.apache.servicemix.locks.LockManager</code> interface. By default, this will be set to an instances of <code>org.apache.servicemix.common.locks.impl.SimpleLockManager</code>. </td></tr><tr><td class="confluenceTd"> marshaler </td><td class="confluenceTd"> <em>org.apache.servicemix.components.util.FileMarshaler</em> </td><td class="confluenceTd"> Specifies a <code>FileMarshaler</code> object that will marshal file data into the NMR. The default file marshaller can read valid XML data. <code>FileMarshaler</code> objects are implementations of <code>org.apache.servicemix.components.util.FileMarshaler</code>. </td></tr><tr><td class="confluenceTd"> maxConcurrent </td><td class="confluenceTd"> <em>int</em> </td><td class="confluenceTd"> How many open exchanges can
be pending. Default is -1 for unbounded pending exchanges. Set to 1...n to engage throttling of polled file processing. </td></tr><tr><td class="confluenceTd"> period </td><td class="confluenceTd"> <em>long</em> </td><td class="confluenceTd"> Sets the number of milliseconds between polling attempts. </td></tr><tr><td class="confluenceTd"> recursive </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if sub-directories are polled; if false then the poller will only poll the specified directory. If the endpoint is configured to poll for a specific file rather than a directory then this attribute is ignored. Default is <code>true</code>. </td></tr><tr><td class="confluenceTd"> scheduler </td><td class="confluenceTd"> <em>org.apache.servicemix.common.scheduler.Scheduler</em> </td><td class="confluenceTd"> Set a custom Scheduler implementation if you need more fine-grained control over the polling schedule. </td></tr><tr><td class="confl
uenceTd"> service </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the service the endpoint exposes. </td></tr><tr><td class="confluenceTd"> serviceUnit </td><td class="confluenceTd"> <em>org.apache.servicemix.common.ServiceUnit</em> </td><td class="confluenceTd"> </td></tr><tr><td class="confluenceTd"> targetEndpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> the name of the endpoint to which requests are sent </td></tr><tr><td class="confluenceTd"> targetInterface </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> the QName of the interface to which requests are sent </td></tr><tr><td class="confluenceTd"> targetOperation </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> the QName of the operation to which requests are sent </td></tr><tr><td class="confluenceTd"> targ
etService </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> the QName of the service to which requests are sent </td></tr><tr><td class="confluenceTd"> targetUri </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the target service/endpoint/interface using a URI. </td></tr></table></div><h3 id="filesender"><tt>file:sender</tt></h3><h4 id="Endpointproperties2">Endpoint properties</h4><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Property Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> append </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint appends data to existing files or if it will overwrite existing files. The default is for the endpoint to overwrite existing files. Setting this to <code>true</code> instructs the
endpoint to append data. Default value is <code>false</code>. </td></tr><tr><td class="confluenceTd"> autoCreateDirectory </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint should create the target directory if it does not exist. If you set this to <code>false</code> and the directory does not exist, the endpoint will not do anything. Default value: <code>true</code>. </td></tr><tr><td class="confluenceTd"> component </td><td class="confluenceTd"> <em><a href="#org.apache.servicemix.file.FileComponenttypes">org.apache.servicemix.file.FileComponent</a></em> </td><td class="confluenceTd"> </td></tr><tr><td class="confluenceTd"> directory </td><td class="confluenceTd"> <em>java.io.File</em> </td><td class="confluenceTd"> Specifies the directory where the endpoint writes files. </td></tr><tr><td class="confluenceTd"> endpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluen
ceTd"> The name of the endpoint. </td></tr><tr><td class="confluenceTd"> interfaceName </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the interface exposed by the endpoint. </td></tr><tr><td class="confluenceTd"> marshaler </td><td class="confluenceTd"> <em>org.apache.servicemix.components.util.FileMarshaler</em> </td><td class="confluenceTd"> Specifies a <code>FileMarshaler</code> object that will marshal message data from the NMR into a file. The default file marshaler can write valid XML data. <code>FileMarshaler</code> objects are implementations of <code>org.apache.servicemix.components.util.FileMarshaler</code>. </td></tr><tr><td class="confluenceTd"> overwrite </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint overwrites existing files or not. The default is for the endpoint to not overwrite existing files. Setting this to <
;code>true</code> instructs the endpoint to overwrite existing files. Default value is <code>false</code>. </td></tr><tr><td class="confluenceTd"> service </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the service the endpoint exposes. </td></tr><tr><td class="confluenceTd"> tempFilePrefix </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Specifies a string to prefix to the beginning of generated file names. </td></tr><tr><td class="confluenceTd"> tempFileSuffix </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Specifies a string to append to generated file names. </td></tr></table></div>
+ <h2 id="servicemixfile">servicemix-file</h2><h3 id="Overview">Overview</h3><p>The ServiceMix File component provides JBI integration to the file system. It can be used to read & write files via URI or to periodically poll directories for new files.</p><h4 id="Namespaceandxbean.xml">Namespace and xbean.xml</h4><p>The namespace URI for the servicemix-bean JBI component is <tt>http://servicemix.apache.org/file/1.0</tt>. This is an example of an <tt>xbean.xml</tt> file with a namespace definition with prefix <tt>bean</tt>.</p><div class="syntax"><div class="highlight"><pre><span class="nt"><beans</span> <span class="na">xmlns:file=</span><span class="s">"http://servicemix.apache.org/file/1.0"</span><span class="nt">></span>

 <span class="c"><!-- add file:poller and file:sender definitions here --></span>

<span class="nt"></beans></span>
</pre></div>
</div><h4 id="Endpointtypes">Endp
oint types</h4><p>The servicemix-file component defines two endpoint type:</p><ul style="list-style: square"><li><p><tt>file:poller</tt> :: Periodically polls a directory for files and sends an exchange for every file</p></li><li><p><tt>file:sender</tt> :: Writes the contents of an exchange to a file</p></li></ul><h3 id="filepoller"><tt>file:poller</tt></h3><h4 id="Endpointproperties">Endpoint properties</h4><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Property Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> archive </td><td class="confluenceTd"> <em>java.io.File</em> </td><td class="confluenceTd"> Specifies a directory relative to the polling directory to which processed files are archived. </td></tr><tr><td class="confluenceTd"> autoCreateDirectory </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint should
create the target directory, if it does not already exist. If you set this to <code>false</code> and the directory does not exist, the endpoint will not do anything. Default value is <code>true</code>. </td></tr><tr><td class="confluenceTd"> comparator </td><td class="confluenceTd"> <em>java.util.Comparator</em> </td><td class="confluenceTd"> Specifies a <code>Comparator</code> which will be used to sort File listing before starting to process. The default is null, means no sorting. <code>Comparator</code> objects are implementations of <code>java.util.Comparator</code>. </td></tr><tr><td class="confluenceTd"> component </td><td class="confluenceTd"> <em><a href="#org.apache.servicemix.common.DefaultComponenttypes">org.apache.servicemix.common.DefaultComponent</a></em> </td><td class="confluenceTd"> </td></tr><tr><td class="confluenceTd"> concurrentPolling </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Sets wheth
er more than one poll can be active at a time (true means yes). Default value is <code>false</code>. </td></tr><tr><td class="confluenceTd"> delay </td><td class="confluenceTd"> <em>long</em> </td><td class="confluenceTd"> Sets the amount of time in milliseconds that the endpoint should wait before making the first poll. </td></tr><tr><td class="confluenceTd"> deleteFile </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if files should be deleted after they are processed. Default value is <code>true</code>. </td></tr><tr><td class="confluenceTd"> endpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> The name of the endpoint. </td></tr><tr><td class="confluenceTd"> file </td><td class="confluenceTd"> <em>java.io.File</em> </td><td class="confluenceTd"> Specifies the file or directory to be polled. If it is a directory, all files in the directory or its sub-directories will be process
ed by the endpoint. If it is a file, only files matching the filename will be processed." </td></tr><tr><td class="confluenceTd"> filter </td><td class="confluenceTd"> <em>java.io.FileFilter</em> </td><td class="confluenceTd"> Bean defining the class implementing the file filtering strategy. This bean must be an implementation of the <code>java.io.FileFilter</code> interface. </td></tr><tr><td class="confluenceTd"> firstTime </td><td class="confluenceTd"> <em>java.util.Date</em> </td><td class="confluenceTd"> Sets the date on which the first poll will be executed. If a delay is also set using <code>setDelay</code>, the delay interval will be added after the date specified. </td></tr><tr><td class="confluenceTd"> interfaceName </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the interface exposed by the endpoint. </td></tr><tr><td class="confluenceTd"> lockManager </td><td class="confluenceTd">
<em>org.apache.servicemix.common.locks.LockManager</em> </td><td class="confluenceTd"> Bean defining the class implementing the file locking strategy. This bean must be an implementation of the <code>org.apache.servicemix.locks.LockManager</code> interface. By default, this will be set to an instances of <code>org.apache.servicemix.common.locks.impl.SimpleLockManager</code>. </td></tr><tr><td class="confluenceTd"> marshaler </td><td class="confluenceTd"> <em>org.apache.servicemix.components.util.FileMarshaler</em> </td><td class="confluenceTd"> Specifies a <code>FileMarshaler</code> object that will marshal file data into the NMR. The default file marshaller can read valid XML data. <code>FileMarshaler</code> objects are implementations of <code>org.apache.servicemix.components.util.FileMarshaler</code>. </td></tr><tr><td class="confluenceTd"> maxConcurrent </td><td class="confluenceTd"> <em>int</em> </td><td class="confluenceTd"> How many open
exchanges can be pending. Default is -1 for unbounded pending exchanges. Set to 1...n to engage throttling of polled file processing. </td></tr><tr><td class="confluenceTd"> period </td><td class="confluenceTd"> <em>long</em> </td><td class="confluenceTd"> Sets the number of milliseconds between polling attempts. </td></tr><tr><td class="confluenceTd"> recursive </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if sub-directories are polled; if false then the poller will only poll the specified directory. If the endpoint is configured to poll for a specific file rather than a directory then this attribute is ignored. Default is <code>true</code>. </td></tr><tr><td class="confluenceTd"> scheduler </td><td class="confluenceTd"> <em>org.apache.servicemix.common.scheduler.Scheduler</em> </td><td class="confluenceTd"> Set a custom Scheduler implementation if you need more fine-grained control over the polling schedule. </td></tr><tr><t
d class="confluenceTd"> service </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the service the endpoint exposes. </td></tr><tr><td class="confluenceTd"> serviceUnit </td><td class="confluenceTd"> <em>org.apache.servicemix.common.ServiceUnit</em> </td><td class="confluenceTd"> </td></tr><tr><td class="confluenceTd"> targetEndpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> the name of the endpoint to which requests are sent </td></tr><tr><td class="confluenceTd"> targetInterface </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> the QName of the interface to which requests are sent </td></tr><tr><td class="confluenceTd"> targetOperation </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> the QName of the operation to which requests are sent </td></tr><tr><td class="confl
uenceTd"> targetService </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> the QName of the service to which requests are sent </td></tr><tr><td class="confluenceTd"> targetUri </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the target service/endpoint/interface using a URI. </td></tr></table></div><h3 id="filesender"><tt>file:sender</tt></h3><h4 id="Endpointproperties2">Endpoint properties</h4><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Property Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> append </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint appends data to existing files or if it will overwrite existing files. The default is for the endpoint to overwrite existing files. Setting this to <code>true</code>
instructs the endpoint to append data. Default value is <code>false</code>. </td></tr><tr><td class="confluenceTd"> autoCreateDirectory </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint should create the target directory if it does not exist. If you set this to <code>false</code> and the directory does not exist, the endpoint will not do anything. Default value: <code>true</code>. </td></tr><tr><td class="confluenceTd"> component </td><td class="confluenceTd"> <em><a href="#org.apache.servicemix.file.FileComponenttypes">org.apache.servicemix.file.FileComponent</a></em> </td><td class="confluenceTd"> </td></tr><tr><td class="confluenceTd"> directory </td><td class="confluenceTd"> <em>java.io.File</em> </td><td class="confluenceTd"> Specifies the directory where the endpoint writes files. </td></tr><tr><td class="confluenceTd"> endpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td c
lass="confluenceTd"> The name of the endpoint. </td></tr><tr><td class="confluenceTd"> interfaceName </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the interface exposed by the endpoint. </td></tr><tr><td class="confluenceTd"> marshaler </td><td class="confluenceTd"> <em>org.apache.servicemix.components.util.FileMarshaler</em> </td><td class="confluenceTd"> Specifies a <code>FileMarshaler</code> object that will marshal message data from the NMR into a file. The default file marshaler can write valid XML data. <code>FileMarshaler</code> objects are implementations of <code>org.apache.servicemix.components.util.FileMarshaler</code>. </td></tr><tr><td class="confluenceTd"> overwrite </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint overwrites existing files or not. The default is for the endpoint to not overwrite existing files. Setti
ng this to <code>true</code> instructs the endpoint to overwrite existing files. Default value is <code>false</code>. </td></tr><tr><td class="confluenceTd"> service </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the service the endpoint exposes. </td></tr><tr><td class="confluenceTd"> tempFilePrefix </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Specifies a string to prefix to the beginning of generated file names. </td></tr><tr><td class="confluenceTd"> tempFileSuffix </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Specifies a string to append to generated file names. </td></tr></table></div>
</div>
</div>
Modified: servicemix/site/production/docs/4.4.x/jbi/components/servicemix-ftp.html
URL: http://svn.apache.org/viewvc/servicemix/site/production/docs/4.4.x/jbi/components/servicemix-ftp.html?rev=1444219&r1=1444218&r2=1444219&view=diff
==============================================================================
--- servicemix/site/production/docs/4.4.x/jbi/components/servicemix-ftp.html (original)
+++ servicemix/site/production/docs/4.4.x/jbi/components/servicemix-ftp.html Fri Feb 8 20:35:02 2013
@@ -118,7 +118,7 @@
<p>JBI 1.0 support is available in Apache ServiceMix 4 to allow existing users to migrate more easily to this latest version - if you're a new user, you should consider JBI deprecated and not use it for your project.
Take a look at our <a href="../../users-guide/getting-started/technology-selection.html"</a>technology selection guidelines</a> for more information.</p>
</div>
- <h2 id="servicemixftp">servicemix-ftp</h2><h3 id="Overview">Overview</h3><p>The ServiceMix FTP component provides JBI integration to the FTP servers. It can be used to read & write files over FTPor to periodically poll directories for new files.</p><h4 id="Namespaceandxbean.xml">Namespace and xbean.xml</h4><p>The namespace URI for the servicemix-bean JBI component is <tt>http://servicemix.apache.org/ftp/1.0</tt>. This is an example of an <tt>xbean.xml</tt> file with a namespace definition with prefix <tt>bean</tt>.</p><div class="syntax"><div class="highlight"><pre><span class="nt"><beans</span> <span class="na">xmlns:ftp=</span><span class="s">"http://servicemix.apache.org/ftp/1.0"</span><span class="nt">></span>

 <span class="c"><!-- add ftp:poller and ftp:sender definitions here --></span>

<span class="nt"></beans></span>
</pre></div>
</div><h4 id="Endpointtypes">Endpoint typ
es</h4><p>The servicemix-ftp component defines two endpoint type:</p><ul style="list-style: square"><li><tt>ftp:poller</tt> :: Periodically polls a directory on an FTP server for files and sends an exchange for every file</li><li><tt>ftp:sender</tt> :: Writes the contents of an exchange to a file on an FTP server</li></ul><h3 id="ftppoller"><tt>ftp:poller</tt></h3><h4 id="Endpointproperties">Endpoint properties</h4><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Property Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> archive </td><td class="confluenceTd"> <em>java.net.URI</em> </td><td class="confluenceTd"> Specifies a directory relative to the polling directory to which processed files are archived. </td></tr><tr><td class="confluenceTd"> autoCreateDirectory </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint
should create the target directory, if it does not already exist. If you set this to <code>false</code> and the directory does not exist, the endpoint will not do anything. Default value is <code>true</code>. </td></tr><tr><td class="confluenceTd"> changeWorkingDirectory </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> When set to <code>true</code>, the poller will do an explicit <code>cwd</code> into the directory to be polled. Default to <code>false</code>. Recursive polling will not be possible if this feature is enabled. </td></tr><tr><td class="confluenceTd"> clientPool </td><td class="confluenceTd"> <em><a href="#org.apache.servicemix.ftp.FTPClientPooltypes">org.apache.servicemix.ftp.FTPClientPool</a></em> </td><td class="confluenceTd"> Set a custom FTPClientPool. If this property has not been set, the FTP client pool will be created based on the information provided in the URI. </td></tr><tr><td class="conflu
enceTd"> component </td><td class="confluenceTd"> <em><a href="#org.apache.servicemix.common.DefaultComponenttypes">org.apache.servicemix.common.DefaultComponent</a></em> </td><td class="confluenceTd"> the <code>component</code> implementation to use </td></tr><tr><td class="confluenceTd"> concurrentPolling </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Sets whether more than one poll can be active at a time (true means yes). Default value is <code>false</code>. </td></tr><tr><td class="confluenceTd"> delay </td><td class="confluenceTd"> <em>long</em> </td><td class="confluenceTd"> Sets the amount of time in milliseconds that the endpoint should wait before making the first poll. </td></tr><tr><td class="confluenceTd"> deleteFile </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Delete the file after it has been succesfully processed? Defaults to <code>true</code> </td></tr><tr><td class="confluen
ceTd"> endpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> The name of the endpoint. </td></tr><tr><td class="confluenceTd"> filter </td><td class="confluenceTd"> <em>java.io.FileFilter</em> </td><td class="confluenceTd"> Sets the filter to select which files have to be processed. When not set, all files will be picked up by the poller. </td></tr><tr><td class="confluenceTd"> firstTime </td><td class="confluenceTd"> <em>java.util.Date</em> </td><td class="confluenceTd"> Sets the date on which the first poll will be executed. If a delay is also set using <code>setDelay</code>, the delay interval will be added after the date specified. </td></tr><tr><td class="confluenceTd"> interfaceName </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the interface exposed by the endpoint. </td></tr><tr><td class="confluenceTd"> lockManager </td><td class="confluenceTd"> <
em>org.apache.servicemix.common.locks.LockManager</em> </td><td class="confluenceTd"> Set a custom LockManager implementation for keeping track of which files are already being processed. The default implementation is a simple, in-memory lock management system. </td></tr><tr><td class="confluenceTd"> marshaler </td><td class="confluenceTd"> <em>org.apache.servicemix.components.util.FileMarshaler</em> </td><td class="confluenceTd"> Set a custom FileMarshaler implementation to control how the file contents is being translated into a JBI message. The default implementation reads XML contents from the file. </td></tr><tr><td class="confluenceTd"> period </td><td class="confluenceTd"> <em>long</em> </td><td class="confluenceTd"> Sets the number of milliseconds between polling attempts. </td></tr><tr><td class="confluenceTd"> recursive </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies whether subdirectories should be polled. Defaults to <c
ode>true</code> </td></tr><tr><td class="confluenceTd"> scheduler </td><td class="confluenceTd"> <em>org.apache.servicemix.common.scheduler.Scheduler</em> </td><td class="confluenceTd"> Set a custom Scheduler implementation if you need more fine-grained control over the polling schedule. </td></tr><tr><td class="confluenceTd"> service </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the service the endpoint exposes. </td></tr><tr><td class="confluenceTd"> serviceUnit </td><td class="confluenceTd"> <em>org.apache.servicemix.common.ServiceUnit</em> </td><td class="confluenceTd"> </td></tr><tr><td class="confluenceTd"> stateless </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> When set to <code>false</code> </td></tr><tr><td class="confluenceTd"> targetEndpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> the name of the endpoi
nt to which requests are sent </td></tr><tr><td class="confluenceTd"> targetInterface </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> the QName of the interface to which requests are sent </td></tr><tr><td class="confluenceTd"> targetOperation </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> Set the operation to be invoked on the target service. </td></tr><tr><td class="confluenceTd"> targetService </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> the QName of the service to which requests are sent </td></tr><tr><td class="confluenceTd"> targetUri </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the target service/endpoint/interface using a URI. </td></tr><tr><td class="confluenceTd"> uri </td><td class="confluenceTd"> <em>java.net.URI</em> </td><td class="confluenceTd"> Configures the endpo
int from a URI. </td></tr></table></div><h3 id="ftpsender"><tt>ftp:sender</tt></h3><h4 id="Endpointproperties2">Endpoint properties</h4><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Property Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> autoCreateDirectory </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint should create the target directory, if it does not already exist. If you set this to <code>false</code> and the directory does not exist, the endpoint will not do anything. Default value is <code>true</code>. </td></tr><tr><td class="confluenceTd"> checkDuplicates </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies whether duplicates should be checked. Defaults to <code>true</code>. </td></tr><tr><td class="confluenceTd"> clientPool </td><td class="co
nfluenceTd"> <em><a href="#org.apache.servicemix.ftp.FTPClientPooltypes">org.apache.servicemix.ftp.FTPClientPool</a></em> </td><td class="confluenceTd"> Set a custom FTPClientPool. If this property has not been set, the FTP client pool will be created based on the information provided in the URI. </td></tr><tr><td class="confluenceTd"> component </td><td class="confluenceTd"> <em><a href="#org.apache.servicemix.ftp.FtpComponenttypes">org.apache.servicemix.ftp.FtpComponent</a></em> </td><td class="confluenceTd"> </td></tr><tr><td class="confluenceTd"> endpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> The name of the endpoint. </td></tr><tr><td class="confluenceTd"> interfaceName </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the interface exposed by the endpoint. </td></tr><tr><td class="confluenceTd"> marshaler </td><td class="confluenceTd"> <em>org.apache.
servicemix.components.util.FileMarshaler</em> </td><td class="confluenceTd"> Set a custom FileMarshaler implementation to control how the file contents is being translated into a JBI message. The default implementation reads XML contents from the file. </td></tr><tr><td class="confluenceTd"> overwrite </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if a file with the same name already exists on the FTP server, the file should be overwritten. Defaults to <code>false</code>. </td></tr><tr><td class="confluenceTd"> service </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the service the endpoint exposes. </td></tr><tr><td class="confluenceTd"> uniqueFileName </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Sets the name used to make a unique name if no file name is available on the message. </td></tr><tr><td class="confluenc
eTd"> uploadPrefix </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the file name prefix used during upload. The prefix will be automatically removed as soon as the upload has completed. This allows other processes to discern completed files from files that are being uploaded. </td></tr><tr><td class="confluenceTd"> uploadSuffix </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the file name suffix used during upload. The suffix will be automatically removed as soon as the upload has completed. This allows other processes to discern completed files from files that are being uploaded. </td></tr><tr><td class="confluenceTd"> uri </td><td class="confluenceTd"> <em>java.net.URI</em> </td><td class="confluenceTd"> Configures the endpoint from a URI </td></tr></table></div><h3 id="Examples">Examples</h3><h4 id="UsingftppooltoconfiguretheFTPconnections">Using <tt>ftp:pool</tt> to configure the FTP
connections</h4><p>In order to gain more control over the FTP connection parameters (active/passive, timeout, ...) that are being used, you can define your own FTP connection pool. Afterward, you can refer to the pool object from both a sender and poller endpoint.</p><div class="syntax"><div class="highlight"><pre><span class="cp"><?xml version="1.0"?></span>
<span class="nt"><beans</span> <span class="na">xmlns:ftp=</span><span class="s">"http://servicemix.apache.org/ftp/1.0"</span>
 <span class="na">xmlns:sample=</span><span class="s">"urn:servicemix:example"</span><span class="nt">></span>

 <span class="nt"><ftp:sender</span> <span class="na">service=</span><span class="s">"sample:sender"</span> <span class="na">endpoint=</span><span class="s">"endpoint"</span>
 <span class="na">uri=</span><span class="s">"ftp://localhost/myfolder"</span>�
00A; <span class="na">clientPool=</span><span class="s">"#clientPool"</span><span class="nt">/></span>

 <span class="nt"><ftp:pool</span> <span class="na">id=</span><span class="s">"clientPool"</span> <span class="na">username=</span><span class="s">"myname"</span> <span class="na">password=</span><span class="s">"$ecret"</span>
 <span class="na">dataTimeout=</span><span class="s">"90000"</span> <span class="nt">/></span>

<span class="nt"></beans></span>
</pre></div>
</div><p>The table below shows the full list of options offered by <tt>ftp:pool</tt>:</p><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Property Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> address </td><td class="confluenceTd"> <em>java.net.InetAddress</em>
</td><td class="confluenceTd"> Set the remote internet address to connect to. </td></tr><tr><td class="confluenceTd"> binaryMode </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Use binary mode transfers. Defaults to <code>true</code>. </td></tr><tr><td class="confluenceTd"> config </td><td class="confluenceTd"> <em>org.apache.commons.net.ftp.FTPClientConfig</em> </td><td class="confluenceTd"> Configure a custom FTPClientConfig instance to allow more fine-grained control over the FTP connections in the pool. </td></tr><tr><td class="confluenceTd"> controlEncoding </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Configure the encoding used in the FTP control connections. Defaults to <code>ISO-8859-1</code> </td></tr><tr><td class="confluenceTd"> dataTimeout </td><td class="confluenceTd"> <em>int</em> </td><td class="confluenceTd"> Specifies a timeout used on the FTP data connection. Defaults to &
lt;code>120000</code> </td></tr><tr><td class="confluenceTd"> host </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the remote host name to connect to. </td></tr><tr><td class="confluenceTd"> localAddress </td><td class="confluenceTd"> <em>java.net.InetAddress</em> </td><td class="confluenceTd"> Set the local IP address to be used when establishing the connection. </td></tr><tr><td class="confluenceTd"> localPort </td><td class="confluenceTd"> <em>int</em> </td><td class="confluenceTd"> Set the local TCP/IP port to be used when establishing the connection. </td></tr><tr><td class="confluenceTd"> passiveMode </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Use passive mode FTP transfers. Defaults to <code>false</code> </td></tr><tr><td class="confluenceTd"> password </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the password for logging into the FTP s
erver. </td></tr><tr><td class="confluenceTd"> pool </td><td class="confluenceTd"> <em>org.apache.commons.pool.ObjectPool</em> </td><td class="confluenceTd"> Set a custom ObjectPool instance to use for the connection pooling. </td></tr><tr><td class="confluenceTd"> port </td><td class="confluenceTd"> <em>int</em> </td><td class="confluenceTd"> Set the remote port number to connect to. </td></tr><tr><td class="confluenceTd"> username </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the login to use to access the FTP server. </td></tr></table></div><p>If you need even more fine-grained control over the FTP connections or the way the payloads are being handled, have a look at the <a href="http://camel.apache.org/ftp2.html">Camel FTP</a> component, which offers a lot of options out of the box, but also allows setting any property on its underlying Commons NET <a href="http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClien
t.html">FTPClient</a> and <a href="http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClientConfig.html">FTPClientConfig</a> instances. </p>
+ <h2 id="servicemixftp">servicemix-ftp</h2><h3 id="Overview">Overview</h3><p>The ServiceMix FTP component provides JBI integration to the FTP servers. It can be used to read & write files over FTPor to periodically poll directories for new files.</p><h4 id="Namespaceandxbean.xml">Namespace and xbean.xml</h4><p>The namespace URI for the servicemix-bean JBI component is <tt>http://servicemix.apache.org/ftp/1.0</tt>. This is an example of an <tt>xbean.xml</tt> file with a namespace definition with prefix <tt>bean</tt>.</p><div class="syntax"><div class="highlight"><pre><span class="nt"><beans</span> <span class="na">xmlns:ftp=</span><span class="s">"http://servicemix.apache.org/ftp/1.0"</span><span class="nt">></span>

 <span class="c"><!-- add ftp:poller and ftp:sender definitions here --></span>

<span class="nt"></beans></span>
</pre></div>
</div><h4 id="Endpointtypes">Endpoint typ
es</h4><p>The servicemix-ftp component defines two endpoint type:</p><ul style="list-style: square"><li><p><tt>ftp:poller</tt> :: Periodically polls a directory on an FTP server for files and sends an exchange for every file</p></li><li><p><tt>ftp:sender</tt> :: Writes the contents of an exchange to a file on an FTP server</p></li></ul><h3 id="ftppoller"><tt>ftp:poller</tt></h3><h4 id="Endpointproperties">Endpoint properties</h4><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Property Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> archive </td><td class="confluenceTd"> <em>java.net.URI</em> </td><td class="confluenceTd"> Specifies a directory relative to the polling directory to which processed files are archived. </td></tr><tr><td class="confluenceTd"> autoCreateDirectory </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if
the endpoint should create the target directory, if it does not already exist. If you set this to <code>false</code> and the directory does not exist, the endpoint will not do anything. Default value is <code>true</code>. </td></tr><tr><td class="confluenceTd"> changeWorkingDirectory </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> When set to <code>true</code>, the poller will do an explicit <code>cwd</code> into the directory to be polled. Default to <code>false</code>. Recursive polling will not be possible if this feature is enabled. </td></tr><tr><td class="confluenceTd"> clientPool </td><td class="confluenceTd"> <em><a href="#org.apache.servicemix.ftp.FTPClientPooltypes">org.apache.servicemix.ftp.FTPClientPool</a></em> </td><td class="confluenceTd"> Set a custom FTPClientPool. If this property has not been set, the FTP client pool will be created based on the information provided in the URI. </td></tr><tr><td
class="confluenceTd"> component </td><td class="confluenceTd"> <em><a href="#org.apache.servicemix.common.DefaultComponenttypes">org.apache.servicemix.common.DefaultComponent</a></em> </td><td class="confluenceTd"> the <code>component</code> implementation to use </td></tr><tr><td class="confluenceTd"> concurrentPolling </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Sets whether more than one poll can be active at a time (true means yes). Default value is <code>false</code>. </td></tr><tr><td class="confluenceTd"> delay </td><td class="confluenceTd"> <em>long</em> </td><td class="confluenceTd"> Sets the amount of time in milliseconds that the endpoint should wait before making the first poll. </td></tr><tr><td class="confluenceTd"> deleteFile </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Delete the file after it has been succesfully processed? Defaults to <code>true</code> </td></tr><tr><td c
lass="confluenceTd"> endpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> The name of the endpoint. </td></tr><tr><td class="confluenceTd"> filter </td><td class="confluenceTd"> <em>java.io.FileFilter</em> </td><td class="confluenceTd"> Sets the filter to select which files have to be processed. When not set, all files will be picked up by the poller. </td></tr><tr><td class="confluenceTd"> firstTime </td><td class="confluenceTd"> <em>java.util.Date</em> </td><td class="confluenceTd"> Sets the date on which the first poll will be executed. If a delay is also set using <code>setDelay</code>, the delay interval will be added after the date specified. </td></tr><tr><td class="confluenceTd"> interfaceName </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the interface exposed by the endpoint. </td></tr><tr><td class="confluenceTd"> lockManager </td><td class="co
nfluenceTd"> <em>org.apache.servicemix.common.locks.LockManager</em> </td><td class="confluenceTd"> Set a custom LockManager implementation for keeping track of which files are already being processed. The default implementation is a simple, in-memory lock management system. </td></tr><tr><td class="confluenceTd"> marshaler </td><td class="confluenceTd"> <em>org.apache.servicemix.components.util.FileMarshaler</em> </td><td class="confluenceTd"> Set a custom FileMarshaler implementation to control how the file contents is being translated into a JBI message. The default implementation reads XML contents from the file. </td></tr><tr><td class="confluenceTd"> period </td><td class="confluenceTd"> <em>long</em> </td><td class="confluenceTd"> Sets the number of milliseconds between polling attempts. </td></tr><tr><td class="confluenceTd"> recursive </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies whether subdirectories should be polled. Def
aults to <code>true</code> </td></tr><tr><td class="confluenceTd"> scheduler </td><td class="confluenceTd"> <em>org.apache.servicemix.common.scheduler.Scheduler</em> </td><td class="confluenceTd"> Set a custom Scheduler implementation if you need more fine-grained control over the polling schedule. </td></tr><tr><td class="confluenceTd"> service </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the service the endpoint exposes. </td></tr><tr><td class="confluenceTd"> serviceUnit </td><td class="confluenceTd"> <em>org.apache.servicemix.common.ServiceUnit</em> </td><td class="confluenceTd"> </td></tr><tr><td class="confluenceTd"> stateless </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> When set to <code>false</code> </td></tr><tr><td class="confluenceTd"> targetEndpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> the name
of the endpoint to which requests are sent </td></tr><tr><td class="confluenceTd"> targetInterface </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> the QName of the interface to which requests are sent </td></tr><tr><td class="confluenceTd"> targetOperation </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> Set the operation to be invoked on the target service. </td></tr><tr><td class="confluenceTd"> targetService </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> the QName of the service to which requests are sent </td></tr><tr><td class="confluenceTd"> targetUri </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the target service/endpoint/interface using a URI. </td></tr><tr><td class="confluenceTd"> uri </td><td class="confluenceTd"> <em>java.net.URI</em> </td><td class="confluenceTd"> Config
ures the endpoint from a URI. </td></tr></table></div><h3 id="ftpsender"><tt>ftp:sender</tt></h3><h4 id="Endpointproperties2">Endpoint properties</h4><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Property Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> autoCreateDirectory </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if the endpoint should create the target directory, if it does not already exist. If you set this to <code>false</code> and the directory does not exist, the endpoint will not do anything. Default value is <code>true</code>. </td></tr><tr><td class="confluenceTd"> checkDuplicates </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies whether duplicates should be checked. Defaults to <code>true</code>. </td></tr><tr><td class="confluenceTd"> clientPool </td
><td class="confluenceTd"> <em><a href="#org.apache.servicemix.ftp.FTPClientPooltypes">org.apache.servicemix.ftp.FTPClientPool</a></em> </td><td class="confluenceTd"> Set a custom FTPClientPool. If this property has not been set, the FTP client pool will be created based on the information provided in the URI. </td></tr><tr><td class="confluenceTd"> component </td><td class="confluenceTd"> <em><a href="#org.apache.servicemix.ftp.FtpComponenttypes">org.apache.servicemix.ftp.FtpComponent</a></em> </td><td class="confluenceTd"> </td></tr><tr><td class="confluenceTd"> endpoint </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> The name of the endpoint. </td></tr><tr><td class="confluenceTd"> interfaceName </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the interface exposed by the endpoint. </td></tr><tr><td class="confluenceTd"> marshaler </td><td class="confluenceTd"> <
em>org.apache.servicemix.components.util.FileMarshaler</em> </td><td class="confluenceTd"> Set a custom FileMarshaler implementation to control how the file contents is being translated into a JBI message. The default implementation reads XML contents from the file. </td></tr><tr><td class="confluenceTd"> overwrite </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Specifies if a file with the same name already exists on the FTP server, the file should be overwritten. Defaults to <code>false</code>. </td></tr><tr><td class="confluenceTd"> service </td><td class="confluenceTd"> <em>javax.xml.namespace.QName</em> </td><td class="confluenceTd"> The qualified name of the service the endpoint exposes. </td></tr><tr><td class="confluenceTd"> uniqueFileName </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Sets the name used to make a unique name if no file name is available on the message. </td></tr><tr><td cl
ass="confluenceTd"> uploadPrefix </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the file name prefix used during upload. The prefix will be automatically removed as soon as the upload has completed. This allows other processes to discern completed files from files that are being uploaded. </td></tr><tr><td class="confluenceTd"> uploadSuffix </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the file name suffix used during upload. The suffix will be automatically removed as soon as the upload has completed. This allows other processes to discern completed files from files that are being uploaded. </td></tr><tr><td class="confluenceTd"> uri </td><td class="confluenceTd"> <em>java.net.URI</em> </td><td class="confluenceTd"> Configures the endpoint from a URI </td></tr></table></div><h3 id="Examples">Examples</h3><h4 id="UsingftppooltoconfiguretheFTPconnections">Using <tt>ftp:pool</tt> to conf
igure the FTP connections</h4><p>In order to gain more control over the FTP connection parameters (active/passive, timeout, ...) that are being used, you can define your own FTP connection pool. Afterward, you can refer to the pool object from both a sender and poller endpoint.</p><div class="syntax"><div class="highlight"><pre><span class="cp"><?xml version="1.0"?></span>
<span class="nt"><beans</span> <span class="na">xmlns:ftp=</span><span class="s">"http://servicemix.apache.org/ftp/1.0"</span>
 <span class="na">xmlns:sample=</span><span class="s">"urn:servicemix:example"</span><span class="nt">></span>

 <span class="nt"><ftp:sender</span> <span class="na">service=</span><span class="s">"sample:sender"</span> <span class="na">endpoint=</span><span class="s">"endpoint"</span>
 <span class="na">uri=</span><span class="s">"ftp://localhost/myfolder&qu
ot;</span>
 <span class="na">clientPool=</span><span class="s">"#clientPool"</span><span class="nt">/></span>

 <span class="nt"><ftp:pool</span> <span class="na">id=</span><span class="s">"clientPool"</span> <span class="na">username=</span><span class="s">"myname"</span> <span class="na">password=</span><span class="s">"$ecret"</span>
 <span class="na">dataTimeout=</span><span class="s">"90000"</span> <span class="nt">/></span>

<span class="nt"></beans></span>
</pre></div>
</div><p>The table below shows the full list of options offered by <tt>ftp:pool</tt>:</p><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Property Name </th><th class="confluenceTh"> Type </th><th class="confluenceTh"> Description </th></tr><tr><td class="confluenceTd"> address </td><td class="confluenceTd"> <em>java.net.Ine
tAddress</em> </td><td class="confluenceTd"> Set the remote internet address to connect to. </td></tr><tr><td class="confluenceTd"> binaryMode </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Use binary mode transfers. Defaults to <code>true</code>. </td></tr><tr><td class="confluenceTd"> config </td><td class="confluenceTd"> <em>org.apache.commons.net.ftp.FTPClientConfig</em> </td><td class="confluenceTd"> Configure a custom FTPClientConfig instance to allow more fine-grained control over the FTP connections in the pool. </td></tr><tr><td class="confluenceTd"> controlEncoding </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Configure the encoding used in the FTP control connections. Defaults to <code>ISO-8859-1</code> </td></tr><tr><td class="confluenceTd"> dataTimeout </td><td class="confluenceTd"> <em>int</em> </td><td class="confluenceTd"> Specifies a timeout used on the FTP data connection.
Defaults to <code>120000</code> </td></tr><tr><td class="confluenceTd"> host </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the remote host name to connect to. </td></tr><tr><td class="confluenceTd"> localAddress </td><td class="confluenceTd"> <em>java.net.InetAddress</em> </td><td class="confluenceTd"> Set the local IP address to be used when establishing the connection. </td></tr><tr><td class="confluenceTd"> localPort </td><td class="confluenceTd"> <em>int</em> </td><td class="confluenceTd"> Set the local TCP/IP port to be used when establishing the connection. </td></tr><tr><td class="confluenceTd"> passiveMode </td><td class="confluenceTd"> <em>boolean</em> </td><td class="confluenceTd"> Use passive mode FTP transfers. Defaults to <code>false</code> </td></tr><tr><td class="confluenceTd"> password </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the password for logging
into the FTP server. </td></tr><tr><td class="confluenceTd"> pool </td><td class="confluenceTd"> <em>org.apache.commons.pool.ObjectPool</em> </td><td class="confluenceTd"> Set a custom ObjectPool instance to use for the connection pooling. </td></tr><tr><td class="confluenceTd"> port </td><td class="confluenceTd"> <em>int</em> </td><td class="confluenceTd"> Set the remote port number to connect to. </td></tr><tr><td class="confluenceTd"> username </td><td class="confluenceTd"> <em>java.lang.String</em> </td><td class="confluenceTd"> Set the login to use to access the FTP server. </td></tr></table></div><p>If you need even more fine-grained control over the FTP connections or the way the payloads are being handled, have a look at the <a href="http://camel.apache.org/ftp2.html">Camel FTP</a> component, which offers a lot of options out of the box, but also allows setting any property on its underlying Commons NET <a href="http://commons.apache.org/net/api/org/apache/commons/ne
t/ftp/FTPClient.html">FTPClient</a> and <a href="http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClientConfig.html">FTPClientConfig</a> instances. </p>
</div>
</div>