Class FtpsFileSystemConfigBuilder
- java.lang.Object
-
- org.apache.commons.vfs2.FileSystemConfigBuilder
-
- org.apache.commons.vfs2.provider.ftp.FtpFileSystemConfigBuilder
-
- org.apache.commons.vfs2.provider.ftps.FtpsFileSystemConfigBuilder
-
public final class FtpsFileSystemConfigBuilder extends FtpFileSystemConfigBuilder
The configuration builder for various FTPS configuration options.- Since:
- 2.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description FtpsDataChannelProtectionLevel
getDataChannelProtectionLevel(FileSystemOptions opts)
Gets the data channel protection level (PROT).FtpsMode
getFtpsMode(FileSystemOptions opts)
Return the FTPS mode.java.lang.String
getFtpsType(FileSystemOptions opts)
Deprecated.As of 2.1, usegetFtpsMode(FileSystemOptions)
static FtpsFileSystemConfigBuilder
getInstance()
Gets the singleton builder.javax.net.ssl.KeyManager
getKeyManager(FileSystemOptions opts)
Gets the KeyManager used to provide a client-side certificate if the FTPS server requests it.javax.net.ssl.TrustManager
getTrustManager(FileSystemOptions opts)
Gets the TrustManager that validates the FTPS server's certificate.void
setDataChannelProtectionLevel(FileSystemOptions opts, FtpsDataChannelProtectionLevel prot)
Sets the data channel protection level (PROT).void
setFtpsMode(FileSystemOptions opts, FtpsMode ftpsMode)
Set FTPS mode, either "implicit" or "explicit".void
setFtpsType(FileSystemOptions opts, java.lang.String ftpsType)
Deprecated.As of 2.1, usesetFtpsMode(FileSystemOptions, FtpsMode)
void
setKeyManager(FileSystemOptions opts, javax.net.ssl.KeyManager keyManager)
Sets the KeyManager used to provide a client-side certificate if the FTPS server requests it.void
setTrustManager(FileSystemOptions opts, javax.net.ssl.TrustManager trustManager)
Sets the TrustManager that validates the FTPS server's certificate.-
Methods inherited from class org.apache.commons.vfs2.provider.ftp.FtpFileSystemConfigBuilder
getConfigClass, getConnectTimeout, getControlEncoding, getDataTimeout, getDefaultDateFormat, getEntryParser, getEntryParserFactory, getFileType, getPassiveMode, getProxy, getRecentDateFormat, getRemoteVerification, getServerLanguageCode, getServerTimeZoneId, getShortMonthNames, getSoTimeout, getUserDirIsRoot, setConnectTimeout, setControlEncoding, setDataTimeout, setDefaultDateFormat, setEntryParser, setEntryParserFactory, setFileType, setPassiveMode, setProxy, setRecentDateFormat, setRemoteVerification, setServerLanguageCode, setServerTimeZoneId, setShortMonthNames, setSoTimeout, setUserDirIsRoot
-
Methods inherited from class org.apache.commons.vfs2.FileSystemConfigBuilder
getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCharacter, getCharacter, getCharacter, getDouble, getDouble, getDouble, getEnum, getEnum, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getParam, getRootURI, getShort, getShort, getShort, getString, getString, hasObject, hasParam, setParam, setParam, setRootURI
-
-
-
-
Method Detail
-
getInstance
public static FtpsFileSystemConfigBuilder 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:
- Wikipedia: FTPS/Implicit
-
getFtpsMode
public FtpsMode getFtpsMode(FileSystemOptions opts)
Return the FTPS mode. Defaults to "explicit" if not defined.- Parameters:
opts
- The FileSystemOptions.- Returns:
- The file type.
- See Also:
setFtpsType(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
-
setFtpsType
@Deprecated public void setFtpsType(FileSystemOptions opts, java.lang.String ftpsType)
Deprecated.As of 2.1, usesetFtpsMode(FileSystemOptions, FtpsMode)
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:
- Wikipedia: FTPS/Implicit
-
getFtpsType
@Deprecated public java.lang.String getFtpsType(FileSystemOptions opts)
Deprecated.As of 2.1, usegetFtpsMode(FileSystemOptions)
Return the FTPS type. Defaults to "explicit" if not defined.- Parameters:
opts
- The FileSystemOptions.- Returns:
- The file type.
- See Also:
setFtpsType(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
-
getDataChannelProtectionLevel
public FtpsDataChannelProtectionLevel getDataChannelProtectionLevel(FileSystemOptions opts)
Gets the data channel protection level (PROT).- Parameters:
opts
- The FileSystemOptions.- Returns:
- The PROT value.
- Since:
- 2.1
- See Also:
FTPSClient.execPROT(String)
-
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)
-
getKeyManager
public javax.net.ssl.KeyManager getKeyManager(FileSystemOptions opts)
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, javax.net.ssl.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
public javax.net.ssl.TrustManager getTrustManager(FileSystemOptions opts)
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, javax.net.ssl.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)
-
-