Class FtpFileSystemConfigBuilder

    • Constructor Detail

      • FtpFileSystemConfigBuilder

        protected FtpFileSystemConfigBuilder​(java.lang.String prefix)
        Create new config builder with specified prefix string.
        Parameters:
        prefix - prefix string to use for parameters of this config builder.
        Since:
        2.1
    • Method Detail

      • getInstance

        public static FtpFileSystemConfigBuilder getInstance()
        Gets the singleton instance.
        Returns:
        the singleton instance.
      • getConnectTimeout

        public java.lang.Integer getConnectTimeout​(FileSystemOptions opts)
        Gets the timeout in milliseconds to use for the socket connection.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        The timeout in milliseconds to use for the socket connection.
        Since:
        2.1
      • getControlEncoding

        public java.lang.String getControlEncoding​(FileSystemOptions opts)
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        The encoding.
        Since:
        2.0
      • getDefaultDateFormat

        public java.lang.String getDefaultDateFormat​(FileSystemOptions opts)
        Get the default date format used by the server. See FTPClientConfig for details and examples.
        Parameters:
        opts - The FileSystemOptions
        Returns:
        The default date format.
      • getFileType

        public FtpFileType getFileType​(FileSystemOptions opts)
        Gets the file type parameter.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        A FtpFileType
        Since:
        2.1
      • getProxy

        public java.net.Proxy getProxy​(FileSystemOptions opts)
        Gets the Proxy.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        the Proxy
        Since:
        2.1
      • getRecentDateFormat

        public java.lang.String getRecentDateFormat​(FileSystemOptions opts)
        See FTPClientConfig for details and examples.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        The recent date format.
      • getRemoteVerification

        public java.lang.Boolean getRemoteVerification​(FileSystemOptions opts)
        Gets whether to use remote verification.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        True if remote verification should be done.
      • getServerLanguageCode

        public java.lang.String getServerLanguageCode​(FileSystemOptions opts)
        Get the language code used by the server. See FTPClientConfig for details and examples.
        Parameters:
        opts - The FilesystemOptions.
        Returns:
        The language code of the server.
      • getServerTimeZoneId

        public java.lang.String getServerTimeZoneId​(FileSystemOptions opts)
        See FTPClientConfig for details and examples.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        The server timezone id.
      • getShortMonthNames

        public java.lang.String[] getShortMonthNames​(FileSystemOptions opts)
        See FTPClientConfig for details and examples.
        Parameters:
        opts - The FileSystemOptions.
        Returns:
        An array of short month names.
      • setConnectTimeout

        public void setConnectTimeout​(FileSystemOptions opts,
                                      java.lang.Integer connectTimeout)
        Sets the timeout for the initial control connection.

        If you set the connectTimeout to null no connectTimeout will be set.

        Parameters:
        opts - The FileSystemOptions.
        connectTimeout - the timeout value in milliseconds
        Since:
        2.1
      • setControlEncoding

        public void setControlEncoding​(FileSystemOptions opts,
                                       java.lang.String encoding)
        See FTP.setControlEncoding(java.lang.String) for details and examples.
        Parameters:
        opts - The FileSystemOptions.
        encoding - the encoding to use
        Since:
        2.0
      • setDataTimeout

        public void setDataTimeout​(FileSystemOptions opts,
                                   java.lang.Integer dataTimeout)
        Set the data timeout for the ftp client.

        If you set the dataTimeout to null, no dataTimeout will be set on the ftp client.

        Parameters:
        opts - The FileSystemOptions.
        dataTimeout - The timeout value.
      • setDefaultDateFormat

        public void setDefaultDateFormat​(FileSystemOptions opts,
                                         java.lang.String defaultDateFormat)
        Set the default date format used by the server. See FTPClientConfig for details and examples.
        Parameters:
        opts - The FileSystemOptions.
        defaultDateFormat - The default date format.
      • setEntryParserFactory

        public void setEntryParserFactory​(FileSystemOptions opts,
                                          org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory factory)
        FTPFileEntryParserFactory which will be used for ftp-entry parsing.
        Parameters:
        opts - The FileSystemOptions.
        factory - instance of your factory
      • setFileType

        public void setFileType​(FileSystemOptions opts,
                                FtpFileType ftpFileType)
        Sets the file type parameter.
        Parameters:
        opts - The FileSystemOptions.
        ftpFileType - A FtpFileType
        Since:
        2.1
      • setPassiveMode

        public void setPassiveMode​(FileSystemOptions opts,
                                   boolean passiveMode)
        Enter into passive mode.
        Parameters:
        opts - The FileSystemOptions.
        passiveMode - true if passive mode should be used.
      • setProxy

        public void setProxy​(FileSystemOptions opts,
                             java.net.Proxy proxy)
        Sets the Proxy.

        You might need to make sure that passive mode is activated.

        Parameters:
        opts - the FileSystem options.
        proxy - the Proxy
        Since:
        2.1
      • setRecentDateFormat

        public void setRecentDateFormat​(FileSystemOptions opts,
                                        java.lang.String recentDateFormat)
        See FTPClientConfig for details and examples.
        Parameters:
        opts - The FileSystemOptions.
        recentDateFormat - The recent date format.
      • setRemoteVerification

        public void setRemoteVerification​(FileSystemOptions opts,
                                          boolean remoteVerification)
        Sets whether to use remote verification.
        Parameters:
        opts - The FileSystemOptions.
        remoteVerification - True if verification should be done.
      • setServerLanguageCode

        public void setServerLanguageCode​(FileSystemOptions opts,
                                          java.lang.String serverLanguageCode)
        Set the language code used by the server. See FTPClientConfig for details and examples.
        Parameters:
        opts - The FileSystemOptions.
        serverLanguageCode - The servers language code.
      • setServerTimeZoneId

        public void setServerTimeZoneId​(FileSystemOptions opts,
                                        java.lang.String serverTimeZoneId)
        See FTPClientConfig for details and examples.
        Parameters:
        opts - The FileSystemOptions.
        serverTimeZoneId - The server timezone id.
      • setShortMonthNames

        public void setShortMonthNames​(FileSystemOptions opts,
                                       java.lang.String[] shortMonthNames)
        See FTPClientConfig for details and examples.
        Parameters:
        opts - The FileSystemOptions.
        shortMonthNames - an array of short month name Strings.
      • setSoTimeout

        public void setSoTimeout​(FileSystemOptions opts,
                                 java.lang.Integer soTimeout)
        Sets the socket timeout for the FTP client.

        If you set the soTimeout to null, no socket timeout will be set on the ftp client.

        Parameters:
        opts - The FileSystem options.
        soTimeout - The timeout value in milliseconds.
        Since:
        2.0
      • setUserDirIsRoot

        public void setUserDirIsRoot​(FileSystemOptions opts,
                                     boolean userDirIsRoot)
        Use user directory as root (do not change to fs root).
        Parameters:
        opts - The FileSystemOptions.
        userDirIsRoot - true if the user directory should be treated as the root.