- All Implemented Interfaces:
- Serializable, Runnable, Stoppable
public class FTPClientJob
extends Object
implements Runnable, Stoppable, Serializable
Description
Connect to an FTP server and run a set of FTP commands.Example
Doing lots of FTP things.
<oddjob id="this" xmlns:net="http://rgordon.co.uk/oddjob/net">
<job>
<net:ftp host="localhost" port="${ftp.port}" username="admin" password="admin">
<commands>
<list>
<values>
<identify id="pwd">
<value>
<net:ftp-pwd/>
</value>
</identify>
<net:ftp-mk-dir path="stuff"/>
<net:ftp-cd path="stuff"/>
<identify id="list1">
<value>
<net:ftp-list/>
</value>
</identify>
<net:ftp-ascii/>
<net:ftp-put remote="stuff.txt">
<file>
<file file="${this.args[0]}"/>
</file>
</net:ftp-put>
<identify id="list2">
<value>
<net:ftp-list/>
</value>
</identify>
<net:ftp-rename from="stuff.txt" to="things.txt"/>
<net:ftp-get remote="things.txt">
<file>
<file file="${this.args[1]}"/>
</file>
</net:ftp-get>
<net:ftp-delete path="things.txt"/>
<net:ftp-bin/>
<net:ftp-cd/>
<net:ftp-rm-dir path="stuff"/>
</values>
</list>
</commands>
</net:ftp>
</job>
</oddjob>
- See Also:
- Serialized Form
- Author:
- rob