Search in sources :

Example 6 with CommonsNetFtpClient

use of com.adaptris.ftp.CommonsNetFtpClient in project interlok by adaptris.

the class TestCommonsNetFtp method connectClientImpl.

@Override
protected FileTransferClient connectClientImpl() throws Exception {
    CommonsNetFtpClient client = new CommonsNetFtpClient(config.getProperty(FTP_HOST));
    client.setAdditionalDebug(true);
    client.connect(config.getProperty(FTP_USERNAME), Password.decode(config.getProperty(FTP_PASSWORD)));
    logR.trace("Server OS         : " + client.system());
    logR.trace("Current Directory : " + client.pwd());
    // logR.trace("Transfer Type : " + client.getType().toString());
    return client;
}
Also used : CommonsNetFtpClient(com.adaptris.ftp.CommonsNetFtpClient)

Aggregations

CommonsNetFtpClient (com.adaptris.ftp.CommonsNetFtpClient)6 Test (org.junit.Test)5 FileTransferClient (com.adaptris.filetransfer.FileTransferClient)2 IOException (java.io.IOException)2 NoRouteToHostException (java.net.NoRouteToHostException)2 SocketTimeoutException (java.net.SocketTimeoutException)2 Date (java.util.Date)2