C
- The type of FTPClient.B
- The type of FtpFileSystemConfigBuilderpublic abstract static class FtpClientFactory.ConnectionFactory<C extends org.apache.commons.net.ftp.FTPClient,B extends FtpFileSystemConfigBuilder> extends Object
Modifier | Constructor and Description |
---|---|
protected |
ConnectionFactory(B builder)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract C |
createClient(FileSystemOptions fileSystemOptions)
Creates a new client.
|
C |
createConnection(String hostname,
int port,
char[] username,
char[] password,
String workingDirectory,
FileSystemOptions fileSystemOptions)
Creates a connection.
|
protected abstract void |
setupOpenConnection(C client,
FileSystemOptions fileSystemOptions)
Sets up a new client.
|
protected B extends FtpFileSystemConfigBuilder builder
protected ConnectionFactory(B builder)
builder
- How to build.protected abstract C createClient(FileSystemOptions fileSystemOptions) throws FileSystemException
fileSystemOptions
- the file system options.FileSystemException
- if a file system error occurs.public C createConnection(String hostname, int port, char[] username, char[] password, String workingDirectory, FileSystemOptions fileSystemOptions) throws FileSystemException
hostname
- The host name or IP address.port
- The host port.username
- The user name.password
- The user password.workingDirectory
- The working directory.fileSystemOptions
- Options to create the connection.FileSystemException
- if an error occurs while connecting.protected abstract void setupOpenConnection(C client, FileSystemOptions fileSystemOptions) throws IOException
client
- the client.fileSystemOptions
- the file system options.IOException
- if an IO error occurs.Copyright © 2002–2025 The Apache Software Foundation. All rights reserved.