Class FtpsFileSystemConfigBuilder


The configuration builder for various FTPS configuration options.
Since:
2.0
  • Method Details

    • getInstance

      Gets the singleton builder.
      Returns:
      the singleton builder.
    • setFtpsMode

      public void setFtpsMode(FileSystemOptions opts, FtpsMode ftpsMode)
      Set FTPS mode, either "implicit" or "explicit".

      Note, that implicit mode is not standardized and considered as deprecated. Some unit tests for VFS fail with implicit mode and it is not yet clear if its a problem with Commons VFS/Commons Net or our test server Apache FTP/SSHD.

      Parameters:
      opts - The FileSystemOptions.
      ftpsMode - The mode to establish a FTPS connection.
      Since:
      2.1
      See Also:
    • getFtpsMode

      Return the FTPS mode. Defaults to "explicit" if not defined.
      Parameters:
      opts - The FileSystemOptions.
      Returns:
      The file type.
      See Also:
    • setFtpsType

      @Deprecated public void setFtpsType(FileSystemOptions opts, String ftpsType)
      Deprecated.
      Set FTPS type, either "implicit" or "explicit".

      Note, that implicit mode is not standardized and considered as deprecated. Some unit tests for VFS fail with implicit mode and it is not yet clear if its a problem with Commons VFS/Commons Net or our test server Apache FTP/SSHD.

      Parameters:
      opts - The FileSystemOptions.
      ftpsType - The file type.
      See Also:
    • getFtpsType

      Deprecated.
      Return the FTPS type. Defaults to "explicit" if not defined.
      Parameters:
      opts - The FileSystemOptions.
      Returns:
      The file type.
      See Also:
    • getDataChannelProtectionLevel

      Gets the data channel protection level (PROT).
      Parameters:
      opts - The FileSystemOptions.
      Returns:
      The PROT value.
      Since:
      2.1
      See Also:
      • FTPSClient.execPROT(String)
    • setDataChannelProtectionLevel

      Sets the data channel protection level (PROT).
      Parameters:
      opts - The FileSystemOptions.
      prot - The PROT value, null has no effect.
      Since:
      2.1
      See Also:
      • FTPSClient.execPROT(String)
    • getKeyManager

      Gets the KeyManager used to provide a client-side certificate if the FTPS server requests it.
      Parameters:
      opts - The FileSystemOptions.
      Returns:
      the key manager instance or null
      Since:
      2.1
      See Also:
      • FTPSClient.setKeyManager(KeyManager)
    • setKeyManager

      public void setKeyManager(FileSystemOptions opts, KeyManager keyManager)
      Sets the KeyManager used to provide a client-side certificate if the FTPS server requests it.
      Parameters:
      opts - The FileSystemOptions.
      keyManager - The key manager instance.
      Since:
      2.1
      See Also:
      • FTPSClient.setKeyManager(KeyManager)
    • getTrustManager

      Gets the TrustManager that validates the FTPS server's certificate.

      If the params do not contain the key for the trust manager, it will return a trust manger that simply checks this certificate for validity.

      Parameters:
      opts - The FileSystemOptions.
      Returns:
      the trust manager instance or null
      Since:
      2.1
      See Also:
      • FTPSClient.setTrustManager(TrustManager)
    • setTrustManager

      public void setTrustManager(FileSystemOptions opts, TrustManager trustManager)
      Sets the TrustManager that validates the FTPS server's certificate.
      Parameters:
      opts - The FileSystemOptions.
      trustManager - The trust manager instance.
      Since:
      2.1
      See Also:
      • FTPSClient.setTrustManager(TrustManager)