Class FtpClientFactory.ConnectionFactory<C extends org.apache.commons.net.ftp.FTPClient,​B extends FtpFileSystemConfigBuilder>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected B builder
      My builder.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ConnectionFactory​(B builder)
      Constructs a new instance.
    • Constructor Detail

      • ConnectionFactory

        protected ConnectionFactory​(B builder)
        Constructs a new instance.
        Parameters:
        builder - How to build.
    • Method Detail

      • createConnection

        public C createConnection​(java.lang.String hostname,
                                  int port,
                                  char[] username,
                                  char[] password,
                                  java.lang.String workingDirectory,
                                  FileSystemOptions fileSystemOptions)
                           throws FileSystemException
        Creates a connection.
        Parameters:
        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.
        Returns:
        A new connection.
        Throws:
        FileSystemException - if an error occurs while connecting.
      • setupOpenConnection

        protected abstract void setupOpenConnection​(C client,
                                                    FileSystemOptions fileSystemOptions)
                                             throws java.io.IOException
        Sets up a new client.
        Parameters:
        client - the client.
        fileSystemOptions - the file system options.
        Throws:
        java.io.IOException - if an IO error occurs.