Package com.adaptris.ftp
Class CommonsNetFtpClient
- java.lang.Object
-
- com.adaptris.filetransfer.FileTransferClientImp
-
- com.adaptris.ftp.ApacheFtpClientImpl<org.apache.commons.net.ftp.FTPClient>
-
- com.adaptris.ftp.CommonsNetFtpClient
-
- All Implemented Interfaces:
FileTransferClient
,FtpFileTransferClient
,java.io.Closeable
,java.lang.AutoCloseable
public class CommonsNetFtpClient extends ApacheFtpClientImpl<org.apache.commons.net.ftp.FTPClient>
FTP Client implementation.#
-
-
Field Summary
-
Fields inherited from class com.adaptris.ftp.ApacheFtpClientImpl
additionalSettings
-
Fields inherited from class com.adaptris.filetransfer.FileTransferClientImp
logR
-
-
Constructor Summary
Constructors Constructor Description CommonsNetFtpClient(java.lang.String remoteHost)
CommonsNetFtpClient(java.lang.String remoteHost, int port)
CommonsNetFtpClient(java.lang.String remoteHost, int port, int timeout)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.commons.net.ftp.FTPClient
createFTPClient()
Create the base commons net client.protected void
postConnectSettings(org.apache.commons.net.ftp.FTPClient client)
protected void
preConnectSettings(org.apache.commons.net.ftp.FTPClient client)
-
Methods inherited from class com.adaptris.ftp.ApacheFtpClientImpl
chdir, connect, connect, delete, dir, dir, disconnect, disconnect, get, get, getKeepAliveTimeout, getTimeout, handleReturnValue, isConnected, isDirectory, lastModified, lastModifiedDate, mkdir, put, pwd, rename, rmdir, setDataMode, setKeepAliveTimeout, setServerTimezone, setTimeout, setType, system, withAdditionalSettings
-
Methods inherited from class com.adaptris.filetransfer.FileTransferClientImp
ensureNotNull, isAdditionaDebug, log, setAdditionalDebug
-
-
-
-
Constructor Detail
-
CommonsNetFtpClient
public CommonsNetFtpClient(java.lang.String remoteHost, int port, int timeout) throws java.io.IOException
Constructor.- Parameters:
remoteHost
- the remote hostnameport
- the port for control streamtimeout
- the length of the timeout, in milliseconds- Throws:
java.io.IOException
- if a comms error occurs
-
CommonsNetFtpClient
public CommonsNetFtpClient(java.lang.String remoteHost) throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
CommonsNetFtpClient(String, int, int)
-
CommonsNetFtpClient
public CommonsNetFtpClient(java.lang.String remoteHost, int port) throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
CommonsNetFtpClient(String, int, int)
-
-
Method Detail
-
createFTPClient
protected org.apache.commons.net.ftp.FTPClient createFTPClient()
Description copied from class:ApacheFtpClientImpl
Create the base commons net client.- Specified by:
createFTPClient
in classApacheFtpClientImpl<org.apache.commons.net.ftp.FTPClient>
- Returns:
- the actual FtpClient implementation that will be used.
-
preConnectSettings
protected void preConnectSettings(org.apache.commons.net.ftp.FTPClient client) throws java.io.IOException
- Specified by:
preConnectSettings
in classApacheFtpClientImpl<org.apache.commons.net.ftp.FTPClient>
- Throws:
java.io.IOException
-
postConnectSettings
protected void postConnectSettings(org.apache.commons.net.ftp.FTPClient client) throws java.io.IOException
- Specified by:
postConnectSettings
in classApacheFtpClientImpl<org.apache.commons.net.ftp.FTPClient>
- Throws:
java.io.IOException
-
-