org.curjent.example.agent.ftpxfer
Class FTPTransferClient

java.lang.Object
  extended by org.curjent.example.agent.ftpxfer.FTPTransferClient

 class FTPTransferClient
extends Object

FTP functionality. Wraps the apache commons FTP client and adds functionality specific to this example.


Field Summary
private  org.apache.commons.net.ftp.FTPClient ftp
           
private  String local
           
private static Logger logger
           
private  String remote
           
 
Constructor Summary
FTPTransferClient(String remote, String local)
           
 
Method Summary
(package private)  String connect()
           
(package private)  void disconnect()
           
(package private)  org.apache.commons.net.ftp.FTPFile[] list(String dir)
           
private  File local(String remote)
           
(package private)  void retrieve(String remote)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

remote

private final String remote

local

private final String local

ftp

private org.apache.commons.net.ftp.FTPClient ftp

logger

private static final Logger logger
Constructor Detail

FTPTransferClient

FTPTransferClient(String remote,
                  String local)
Method Detail

connect

String connect()
         throws IOException
Throws:
IOException

disconnect

void disconnect()
          throws IOException
Throws:
IOException

list

org.apache.commons.net.ftp.FTPFile[] list(String dir)
                                    throws IOException
Throws:
IOException

retrieve

void retrieve(String remote)
        throws IOException
Throws:
IOException

local

private File local(String remote)
            throws IOException
Throws:
IOException


Copyright 2009-2011 Tom Landon
Apache License 2.0