Class FtpsFileSystemConfigBuilder
java.lang.Object
org.apache.commons.vfs2.FileSystemConfigBuilder
org.apache.commons.vfs2.provider.ftp.FtpFileSystemConfigBuilder
org.apache.commons.vfs2.provider.ftps.FtpsFileSystemConfigBuilder
The configuration builder for various FTPS configuration options.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionGets the data channel protection level (PROT).getFtpsMode
(FileSystemOptions opts) Returns the FTPS mode.getFtpsType
(FileSystemOptions opts) Deprecated.static FtpsFileSystemConfigBuilder
Gets the singleton builder.Gets the KeyManager used to provide a client-side certificate if the FTPS server requests it.Gets the TrustManager that validates the FTPS server's certificate.void
Sets the data channel protection level (PROT).void
setFtpsMode
(FileSystemOptions opts, FtpsMode ftpsMode) Sets FTPS mode, either "implicit" or "explicit".void
setFtpsType
(FileSystemOptions opts, String ftpsType) Deprecated.As of 2.1, usesetFtpsMode(FileSystemOptions, FtpsMode)
void
setKeyManager
(FileSystemOptions opts, KeyManager keyManager) Sets the KeyManager used to provide a client-side certificate if the FTPS server requests it.void
setTrustManager
(FileSystemOptions opts, TrustManager trustManager) Sets the TrustManager that validates the FTPS server's certificate.Methods inherited from class org.apache.commons.vfs2.provider.ftp.FtpFileSystemConfigBuilder
getActivePortRange, getAutodetectUtf8, getConfigClass, getConnectTimeout, getConnectTimeoutDuration, getControlEncoding, getControlKeepAliveReplyTimeout, getControlKeepAliveTimeout, getDataTimeout, getDataTimeoutDuration, getDefaultDateFormat, getEntryParser, getEntryParserFactory, getFileType, getMdtmLastModifiedTime, getPassiveMode, getProxy, getRecentDateFormat, getRemoteVerification, getSaneTransferAbortedOkReplyCodes, getServerLanguageCode, getServerTimeZoneId, getShortMonthNames, getSoTimeout, getSoTimeoutDuration, getTransferAbortedOkReplyCodes, getUserDirIsRoot, setActivePortRange, setAutodetectUtf8, setConnectTimeout, setConnectTimeout, setControlEncoding, setControlKeepAliveReplyTimeout, setControlKeepAliveTimeout, setDataTimeout, setDataTimeout, setDefaultDateFormat, setEntryParser, setEntryParserFactory, setFileType, setMdtmLastModifiedTime, setPassiveMode, setProxy, setRecentDateFormat, setRemoteVerification, setServerLanguageCode, setServerTimeZoneId, setShortMonthNames, setSoTimeout, setSoTimeout, setTransferAbortedOkReplyCodes, setUserDirIsRoot
Methods inherited from class org.apache.commons.vfs2.FileSystemConfigBuilder
getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCharacter, getCharacter, getCharacter, getDouble, getDouble, getDouble, getDuration, getDuration, getDurationInteger, getDurationInteger, getEnum, getEnum, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getParam, getParamOrDefault, getRootURI, getShort, getShort, getShort, getString, getString, hasObject, hasParam, setParam, setParam, setRootURI, toBooleanObject
-
Method Details
-
getInstance
Gets the singleton builder.- Returns:
- the singleton builder.
-
getDataChannelProtectionLevel
Gets the data channel protection level (PROT).- Parameters:
opts
- The FileSystemOptions.- Returns:
- The PROT value.
- Since:
- 2.1
- See Also:
-
FTPSClient.execPROT(String)
-
getFtpsMode
Returns the FTPS mode. Defaults to "explicit" if not defined.- Parameters:
opts
- The FileSystemOptions.- Returns:
- The file type.
- See Also:
-
getFtpsType
Deprecated.As of 2.1, usegetFtpsMode(FileSystemOptions)
Returns the FTPS type. Defaults to "explicit" if not defined.- Parameters:
opts
- The FileSystemOptions.- Returns:
- The file type.
- See Also:
-
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)
-
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)
-
setDataChannelProtectionLevel
public void setDataChannelProtectionLevel(FileSystemOptions opts, FtpsDataChannelProtectionLevel prot) 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)
-
setFtpsMode
Sets 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:
-
setFtpsType
Deprecated.As of 2.1, usesetFtpsMode(FileSystemOptions, FtpsMode)
Sets 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:
-
setKeyManager
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)
-
setTrustManager
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)
-
getFtpsMode(FileSystemOptions)