public class FtpFileSystemConfigBuilder extends FileSystemConfigBuilder
Modifier | Constructor and Description |
---|---|
protected |
FtpFileSystemConfigBuilder(String prefix)
Create new config builder with specified prefix string.
|
Modifier and Type | Method and Description |
---|---|
Boolean |
getAutodetectUtf8(FileSystemOptions options)
Gets whether to try to autodetect the server encoding (only UTF8 is supported).
|
protected Class<? extends FileSystem> |
getConfigClass()
Gets the target of this configuration.
|
Integer |
getConnectTimeout(FileSystemOptions options)
Deprecated.
|
Duration |
getConnectTimeoutDuration(FileSystemOptions options)
Gets the timeout in milliseconds to use for the socket connection.
|
String |
getControlEncoding(FileSystemOptions options) |
Duration |
getControlKeepAliveReplyTimeout(FileSystemOptions options) |
Duration |
getControlKeepAliveTimeout(FileSystemOptions options) |
Integer |
getDataTimeout(FileSystemOptions options)
Deprecated.
|
Duration |
getDataTimeoutDuration(FileSystemOptions options)
Gets the timeout for opening the data channel.
|
String |
getDefaultDateFormat(FileSystemOptions options)
Get the default date format used by the server.
|
String |
getEntryParser(FileSystemOptions options) |
org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory |
getEntryParserFactory(FileSystemOptions options) |
FtpFileType |
getFileType(FileSystemOptions options)
Gets the file type parameter.
|
static FtpFileSystemConfigBuilder |
getInstance()
Gets the singleton instance.
|
Boolean |
getMdtmLastModifiedTime(FileSystemOptions options)
Gets the option to use FTP MDTM for
FileContent.getLastModifiedTime() . |
Boolean |
getPassiveMode(FileSystemOptions options) |
Proxy |
getProxy(FileSystemOptions options)
Gets the Proxy.
|
String |
getRecentDateFormat(FileSystemOptions options)
See
FTPClientConfig for details and examples. |
Boolean |
getRemoteVerification(FileSystemOptions options)
Gets whether to use remote verification.
|
static List<Integer> |
getSaneTransferAbortedOkReplyCodes() |
String |
getServerLanguageCode(FileSystemOptions options)
Get the language code used by the server.
|
String |
getServerTimeZoneId(FileSystemOptions options)
See
FTPClientConfig for details and examples. |
String[] |
getShortMonthNames(FileSystemOptions options)
See
FTPClientConfig for details and examples. |
Integer |
getSoTimeout(FileSystemOptions options)
Deprecated.
|
Duration |
getSoTimeoutDuration(FileSystemOptions options)
Gets The so timeout duration.
|
List<Integer> |
getTransferAbortedOkReplyCodes(FileSystemOptions options) |
Boolean |
getUserDirIsRoot(FileSystemOptions options)
Returns
Boolean.TRUE if VFS should treat the user directory as the root directory. |
void |
setAutodetectUtf8(FileSystemOptions options,
Boolean autodetectUTF8)
Sets whether to try to autodetect the server encoding (only UTF8 is supported).
|
void |
setConnectTimeout(FileSystemOptions options,
Duration duration)
Sets the timeout for the initial control connection.
|
void |
setConnectTimeout(FileSystemOptions options,
Integer duration)
Deprecated.
|
void |
setControlEncoding(FileSystemOptions options,
String encoding)
See
FTP.setControlEncoding(java.lang.String) for details and examples. |
void |
setControlKeepAliveReplyTimeout(FileSystemOptions options,
Duration duration)
Sets the control keep alive reply timeout for the FTP client.
|
void |
setControlKeepAliveTimeout(FileSystemOptions options,
Duration duration)
Sets the control keep alive timeout for the FTP client.
|
void |
setDataTimeout(FileSystemOptions options,
Duration duration)
Set the data timeout for the FTP client.
|
void |
setDataTimeout(FileSystemOptions options,
Integer duration)
Deprecated.
|
void |
setDefaultDateFormat(FileSystemOptions options,
String defaultDateFormat)
Set the default date format used by the server.
|
void |
setEntryParser(FileSystemOptions options,
String key)
Set the FQCN of your FileEntryParser used to parse the directory listing from your server.
|
void |
setEntryParserFactory(FileSystemOptions options,
org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory factory)
FTPFileEntryParserFactory which will be used for ftp-entry parsing.
|
void |
setFileType(FileSystemOptions options,
FtpFileType ftpFileType)
Sets the file type parameter.
|
void |
setMdtmLastModifiedTime(FileSystemOptions options,
boolean mdtm)
Sets the option to use FTP MDTM for
FileContent.getLastModifiedTime() . |
void |
setPassiveMode(FileSystemOptions options,
boolean passiveMode)
Enter into passive mode.
|
void |
setProxy(FileSystemOptions options,
Proxy proxy)
Sets the Proxy.
|
void |
setRecentDateFormat(FileSystemOptions options,
String recentDateFormat)
See
FTPClientConfig for details and examples. |
void |
setRemoteVerification(FileSystemOptions options,
boolean remoteVerification)
Sets whether to use remote verification.
|
void |
setServerLanguageCode(FileSystemOptions options,
String serverLanguageCode)
Set the language code used by the server.
|
void |
setServerTimeZoneId(FileSystemOptions options,
String serverTimeZoneId)
See
FTPClientConfig for details and examples. |
void |
setShortMonthNames(FileSystemOptions options,
String[] shortMonthNames)
See
FTPClientConfig for details and examples. |
void |
setSoTimeout(FileSystemOptions options,
Duration timeout)
Sets the socket timeout for the FTP client.
|
void |
setSoTimeout(FileSystemOptions options,
Integer timeout)
Deprecated.
|
void |
setTransferAbortedOkReplyCodes(FileSystemOptions options,
List<Integer> replyCodes)
Sets the list of reply codes that are considered as OK when prematurely closing a stream.
|
void |
setUserDirIsRoot(FileSystemOptions options,
boolean userDirIsRoot)
Use user directory as root (do not change to fs root).
|
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, getRootURI, getShort, getShort, getShort, getString, getString, hasObject, hasParam, setParam, setParam, setRootURI, toBooleanObject
protected FtpFileSystemConfigBuilder(String prefix)
prefix
- prefix string to use for parameters of this config builder.public static FtpFileSystemConfigBuilder getInstance()
public Boolean getAutodetectUtf8(FileSystemOptions options)
options
- The FileSystemOptions.protected Class<? extends FileSystem> getConfigClass()
FileSystemConfigBuilder
getConfigClass
in class FileSystemConfigBuilder
@Deprecated public Integer getConnectTimeout(FileSystemOptions options)
getConnectTimeoutDuration(FileSystemOptions)
.options
- The FileSystemOptions.public Duration getConnectTimeoutDuration(FileSystemOptions options)
options
- The FileSystemOptions.public String getControlEncoding(FileSystemOptions options)
options
- The FileSystemOptions.public Duration getControlKeepAliveReplyTimeout(FileSystemOptions options)
options
- The FileSystem optionspublic Duration getControlKeepAliveTimeout(FileSystemOptions options)
options
- The FileSystem options@Deprecated public Integer getDataTimeout(FileSystemOptions options)
getDataTimeoutDuration(FileSystemOptions)
.options
- The FileSystemOptions.setDataTimeout(org.apache.commons.vfs2.FileSystemOptions, java.time.Duration)
public Duration getDataTimeoutDuration(FileSystemOptions options)
options
- The FileSystemOptions.setDataTimeout(org.apache.commons.vfs2.FileSystemOptions, java.time.Duration)
public String getDefaultDateFormat(FileSystemOptions options)
FTPClientConfig
for
details and examples.options
- The FileSystemOptionspublic String getEntryParser(FileSystemOptions options)
options
- The FileSystemOptions.setEntryParser(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
public org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory getEntryParserFactory(FileSystemOptions options)
options
- The FlleSystemOptions.setEntryParserFactory(org.apache.commons.vfs2.FileSystemOptions, org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory)
public FtpFileType getFileType(FileSystemOptions options)
options
- The FileSystemOptions.public Boolean getMdtmLastModifiedTime(FileSystemOptions options)
FileContent.getLastModifiedTime()
.options
- The FileSystemOptions.public Boolean getPassiveMode(FileSystemOptions options)
options
- The FileSystemOptions.setPassiveMode(org.apache.commons.vfs2.FileSystemOptions, boolean)
public Proxy getProxy(FileSystemOptions options)
options
- The FileSystemOptions.public String getRecentDateFormat(FileSystemOptions options)
FTPClientConfig
for details and examples.options
- The FileSystemOptions.public Boolean getRemoteVerification(FileSystemOptions options)
options
- The FileSystemOptions.public String getServerLanguageCode(FileSystemOptions options)
FTPClientConfig
for details and
examples.options
- The FilesystemOptions.public String getServerTimeZoneId(FileSystemOptions options)
FTPClientConfig
for details and examples.options
- The FileSystemOptions.public String[] getShortMonthNames(FileSystemOptions options)
FTPClientConfig
for details and examples.options
- The FileSystemOptions.@Deprecated public Integer getSoTimeout(FileSystemOptions options)
getSoTimeoutDuration(FileSystemOptions)
.options
- The FileSystem options.getDataTimeout(org.apache.commons.vfs2.FileSystemOptions)
public Duration getSoTimeoutDuration(FileSystemOptions options)
options
- The FileSystem options.getDataTimeout(org.apache.commons.vfs2.FileSystemOptions)
public List<Integer> getTransferAbortedOkReplyCodes(FileSystemOptions options)
options
- The FileSystem options.public Boolean getUserDirIsRoot(FileSystemOptions options)
Boolean.TRUE
if VFS should treat the user directory as the root directory. Defaults to
Boolean.TRUE
if the method setUserDirIsRoot(FileSystemOptions, boolean)
has not been
invoked.options
- The FileSystemOptions.Boolean.TRUE
if VFS treats the user directory as the root directory.setUserDirIsRoot(org.apache.commons.vfs2.FileSystemOptions, boolean)
public void setAutodetectUtf8(FileSystemOptions options, Boolean autodetectUTF8)
options
- The FileSystemOptions.autodetectUTF8
- true if autodetection should be done.public void setConnectTimeout(FileSystemOptions options, Duration duration)
If you set the connectTimeout to null
no connectTimeout will be set.
options
- The FileSystemOptions.duration
- the timeout duration in milliseconds@Deprecated public void setConnectTimeout(FileSystemOptions options, Integer duration)
setConnectTimeout(FileSystemOptions, Duration)
.
If you set the connectTimeout to null
no connectTimeout will be set.
options
- The FileSystemOptions.duration
- the timeout duration.public void setControlEncoding(FileSystemOptions options, String encoding)
FTP.setControlEncoding(java.lang.String)
for details and examples.options
- The FileSystemOptions.encoding
- the encoding to usepublic void setControlKeepAliveReplyTimeout(FileSystemOptions options, Duration duration)
options
- The FileSystem options.duration
- timeout duration.public void setControlKeepAliveTimeout(FileSystemOptions options, Duration duration)
Set the controlKeepAliveTimeout
to ensure the socket be alive after download huge file.
options
- The FileSystem options.duration
- The timeout duration.public void setDataTimeout(FileSystemOptions options, Duration duration)
If you set the dataTimeout
to null
, no dataTimeout will be set on the FTP client.
options
- The FileSystemOptions.duration
- The timeout duration.@Deprecated public void setDataTimeout(FileSystemOptions options, Integer duration)
setDataTimeout(FileSystemOptions, Duration)
.
If you set the dataTimeout
to null
, no dataTimeout will be set on the FTP client.
options
- The FileSystemOptions.duration
- The timeout value.public void setDefaultDateFormat(FileSystemOptions options, String defaultDateFormat)
FTPClientConfig
for
details and examples.options
- The FileSystemOptions.defaultDateFormat
- The default date format.public void setEntryParser(FileSystemOptions options, String key)
If you do not use the default commons-net FTPFileEntryParserFactory e.g. by using setEntryParserFactory(org.apache.commons.vfs2.FileSystemOptions, org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory)
this is the "key" parameter passed as argument into your custom factory.
options
- The FileSystemOptions.key
- The key.public void setEntryParserFactory(FileSystemOptions options, org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory factory)
options
- The FileSystemOptions.factory
- instance of your factorypublic void setFileType(FileSystemOptions options, FtpFileType ftpFileType)
options
- The FileSystemOptions.ftpFileType
- A FtpFileTypepublic void setMdtmLastModifiedTime(FileSystemOptions options, boolean mdtm)
FileContent.getLastModifiedTime()
.options
- The FileSystemOptions.mdtm
- true if MDTM should be used.public void setPassiveMode(FileSystemOptions options, boolean passiveMode)
options
- The FileSystemOptions.passiveMode
- true if passive mode should be used.public void setProxy(FileSystemOptions options, Proxy proxy)
You might need to make sure that passive mode
is activated.
options
- the FileSystem options.proxy
- the Proxypublic void setRecentDateFormat(FileSystemOptions options, String recentDateFormat)
FTPClientConfig
for details and examples.options
- The FileSystemOptions.recentDateFormat
- The recent date format.public void setRemoteVerification(FileSystemOptions options, boolean remoteVerification)
options
- The FileSystemOptions.remoteVerification
- True if verification should be done.public void setServerLanguageCode(FileSystemOptions options, String serverLanguageCode)
FTPClientConfig
for details and
examples.options
- The FileSystemOptions.serverLanguageCode
- The servers language code.public void setServerTimeZoneId(FileSystemOptions options, String serverTimeZoneId)
FTPClientConfig
for details and examples.options
- The FileSystemOptions.serverTimeZoneId
- The server timezone id.public void setShortMonthNames(FileSystemOptions options, String[] shortMonthNames)
FTPClientConfig
for details and examples.options
- The FileSystemOptions.shortMonthNames
- an array of short month name Strings.public void setSoTimeout(FileSystemOptions options, Duration timeout)
If you set the soTimeout
to null
, no socket timeout will be set on the FTP client.
options
- The FileSystem options.timeout
- The timeout value in milliseconds.@Deprecated public void setSoTimeout(FileSystemOptions options, Integer timeout)
setSoTimeout(FileSystemOptions, Duration)
.
If you set the soTimeout
to null
, no socket timeout will be set on the FTP client.
options
- The FileSystem options.timeout
- The timeout value in milliseconds.public void setTransferAbortedOkReplyCodes(FileSystemOptions options, List<Integer> replyCodes)
If you set the replyCodes
to an empty list, all reply codes besides 200 will be
considered as an error.
options
- The FileSystem options.replyCodes
- The reply codes.public void setUserDirIsRoot(FileSystemOptions options, boolean userDirIsRoot)
options
- The FileSystemOptions.userDirIsRoot
- true if the user directory should be treated as the root.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.