Class FTPClientWrapper
java.lang.Object
org.apache.commons.vfs2.provider.ftp.FTPClientWrapper
- All Implemented Interfaces:
FtpClient
A wrapper to the FTPClient to allow automatic reconnect on connection loss.
I decided to not to use eg. noop() to determine the state of the connection to avoid unnecessary server round-trips.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFTPClientWrapper(GenericFileName root, FileSystemOptions fileSystemOptions) -
Method Summary
Modifier and TypeMethodDescriptionbooleanabort()appendFileStream(String relPath) booleanprotected org.apache.commons.net.ftp.FTPClientcreateClient(GenericFileName rootName, UserAuthenticationData authData) booleandeleteFile(String relPath) voidgetRoot()booleanorg.apache.commons.net.ftp.FTPFile[]booleanmakeDirectory(String relPath) booleanremoveDirectory(String relPath) booleanretrieveFileStream(String relPath) retrieveFileStream(String relPath, long restartOffset) storeFileStream(String relPath)
-
Field Details
-
fileSystemOptions
-
-
Constructor Details
-
FTPClientWrapper
protected FTPClientWrapper(GenericFileName root, FileSystemOptions fileSystemOptions) throws FileSystemException - Throws:
FileSystemException
-
-
Method Details
-
getRoot
-
getFileSystemOptions
-
createClient
protected org.apache.commons.net.ftp.FTPClient createClient(GenericFileName rootName, UserAuthenticationData authData) throws FileSystemException - Throws:
FileSystemException
-
isConnected
- Specified by:
isConnectedin interfaceFtpClient- Throws:
FileSystemException
-
disconnect
- Specified by:
disconnectin interfaceFtpClient- Throws:
IOException
-
listFiles
- Specified by:
listFilesin interfaceFtpClient- Throws:
IOException
-
removeDirectory
- Specified by:
removeDirectoryin interfaceFtpClient- Throws:
IOException
-
deleteFile
- Specified by:
deleteFilein interfaceFtpClient- Throws:
IOException
-
rename
- Specified by:
renamein interfaceFtpClient- Throws:
IOException
-
makeDirectory
- Specified by:
makeDirectoryin interfaceFtpClient- Throws:
IOException
-
completePendingCommand
- Specified by:
completePendingCommandin interfaceFtpClient- Throws:
IOException
-
retrieveFileStream
- Specified by:
retrieveFileStreamin interfaceFtpClient- Throws:
IOException
-
retrieveFileStream
- Specified by:
retrieveFileStreamin interfaceFtpClient- Throws:
IOException
-
appendFileStream
- Specified by:
appendFileStreamin interfaceFtpClient- Throws:
IOException
-
storeFileStream
- Specified by:
storeFileStreamin interfaceFtpClient- Throws:
IOException
-
abort
- Specified by:
abortin interfaceFtpClient- Throws:
IOException
-
getReplyString
- Specified by:
getReplyStringin interfaceFtpClient- Throws:
IOException
-