Class FtpClientFactory
- java.lang.Object
-
- org.apache.commons.vfs2.provider.ftp.FtpClientFactory
-
public final class FtpClientFactory extends java.lang.Object
CreatesFtpClientinstances.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFtpClientFactory.ConnectionFactory<C extends org.apache.commons.net.ftp.FTPClient,B extends FtpFileSystemConfigBuilder>Abstract Factory, used to configure different FTPClients.static classFtpClientFactory.FtpConnectionFactoryConnection Factory, used to configure the FTPClient.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.commons.net.ftp.FTPClientcreateConnection(java.lang.String hostname, int port, char[] username, char[] password, java.lang.String workingDirectory, FileSystemOptions fileSystemOptions)Creates a new connection to the server.
-
-
-
Method Detail
-
createConnection
public static org.apache.commons.net.ftp.FTPClient createConnection(java.lang.String hostname, int port, char[] username, char[] password, java.lang.String workingDirectory, FileSystemOptions fileSystemOptions) throws FileSystemException
Creates a new connection to the server.- Parameters:
hostname- The host name of the server.port- The port to connect to.username- The name of the user for authentication.password- The user's password.workingDirectory- The base directory.fileSystemOptions- The FileSystemOptions.- Returns:
- An FTPClient.
- Throws:
FileSystemException- if an error occurs while connecting.
-
-