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
ConstructorsModifierConstructorDescriptionprotected
FTPClientWrapper
(GenericFileName root, FileSystemOptions fileSystemOptions) -
Method Summary
Modifier and TypeMethodDescriptionboolean
abort()
appendFileStream
(String relPath) boolean
protected org.apache.commons.net.ftp.FTPClient
createClient
(GenericFileName rootName, UserAuthenticationData authData) boolean
deleteFile
(String relPath) void
getRoot()
boolean
org.apache.commons.net.ftp.FTPFile[]
boolean
makeDirectory
(String relPath) boolean
removeDirectory
(String relPath) boolean
retrieveFileStream
(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:
isConnected
in interfaceFtpClient
- Throws:
FileSystemException
-
disconnect
- Specified by:
disconnect
in interfaceFtpClient
- Throws:
IOException
-
listFiles
- Specified by:
listFiles
in interfaceFtpClient
- Throws:
IOException
-
removeDirectory
- Specified by:
removeDirectory
in interfaceFtpClient
- Throws:
IOException
-
deleteFile
- Specified by:
deleteFile
in interfaceFtpClient
- Throws:
IOException
-
rename
- Specified by:
rename
in interfaceFtpClient
- Throws:
IOException
-
makeDirectory
- Specified by:
makeDirectory
in interfaceFtpClient
- Throws:
IOException
-
completePendingCommand
- Specified by:
completePendingCommand
in interfaceFtpClient
- Throws:
IOException
-
retrieveFileStream
- Specified by:
retrieveFileStream
in interfaceFtpClient
- Throws:
IOException
-
retrieveFileStream
- Specified by:
retrieveFileStream
in interfaceFtpClient
- Throws:
IOException
-
appendFileStream
- Specified by:
appendFileStream
in interfaceFtpClient
- Throws:
IOException
-
storeFileStream
- Specified by:
storeFileStream
in interfaceFtpClient
- Throws:
IOException
-
abort
- Specified by:
abort
in interfaceFtpClient
- Throws:
IOException
-
getReplyString
- Specified by:
getReplyString
in interfaceFtpClient
- Throws:
IOException
-