Class FtpClientFactory.ConnectionFactory<C extends org.apache.commons.net.ftp.FTPClient,B extends FtpFileSystemConfigBuilder>
- java.lang.Object
-
- org.apache.commons.vfs2.provider.ftp.FtpClientFactory.ConnectionFactory<C,B>
-
- Type Parameters:
C
- The type of FTPClient.B
- The type of FtpFileSystemConfigBuilder
- Direct Known Subclasses:
FtpClientFactory.FtpConnectionFactory
- Enclosing class:
- FtpClientFactory
public abstract static class FtpClientFactory.ConnectionFactory<C extends org.apache.commons.net.ftp.FTPClient,B extends FtpFileSystemConfigBuilder> extends java.lang.Object
Abstract Factory, used to configure different FTPClients.
-
-
Field Summary
Fields Modifier and Type Field Description private static char[]
ANON_CHAR_ARRAY
private static int
BUFSZ
protected B
builder
private org.apache.commons.logging.Log
log
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConnectionFactory(B builder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private void
configureClient(FileSystemOptions fileSystemOptions, C client)
protected abstract C
createClient(FileSystemOptions fileSystemOptions)
C
createConnection(java.lang.String hostname, int port, char[] username, char[] password, java.lang.String workingDirectory, FileSystemOptions fileSystemOptions)
protected abstract void
setupOpenConnection(C client, FileSystemOptions fileSystemOptions)
-
-
-
Field Detail
-
ANON_CHAR_ARRAY
private static final char[] ANON_CHAR_ARRAY
-
BUFSZ
private static final int BUFSZ
- See Also:
- Constant Field Values
-
log
private final org.apache.commons.logging.Log log
-
builder
protected B extends FtpFileSystemConfigBuilder builder
-
-
Constructor Detail
-
ConnectionFactory
protected ConnectionFactory(B builder)
-
-
Method Detail
-
configureClient
private void configureClient(FileSystemOptions fileSystemOptions, C client)
-
createClient
protected abstract C createClient(FileSystemOptions fileSystemOptions) throws FileSystemException
- Throws:
FileSystemException
-
createConnection
public C createConnection(java.lang.String hostname, int port, char[] username, char[] password, java.lang.String workingDirectory, FileSystemOptions fileSystemOptions) throws FileSystemException
- Throws:
FileSystemException
-
setupOpenConnection
protected abstract void setupOpenConnection(C client, FileSystemOptions fileSystemOptions) throws java.io.IOException
- Throws:
java.io.IOException
-
-