public class Http4FileSystemConfigBuilder extends FileSystemConfigBuilder
Modifier and Type | Field and Description |
---|---|
protected static String |
KEY_FOLLOW_REDIRECT
Defines whether the HttpClient should follow redirections from the responses.
|
Modifier | Constructor and Description |
---|---|
protected |
Http4FileSystemConfigBuilder(String prefix)
Construct an
Http4FileSystemConfigBuilder . |
Modifier and Type | Method and Description |
---|---|
protected Class<? extends FileSystem> |
getConfigClass()
Gets the target of this configuration.
|
int |
getConnectionTimeout(FileSystemOptions opts)
Deprecated.
|
Duration |
getConnectionTimeoutDuration(FileSystemOptions opts)
/**
Gets the connection timeout.
|
org.apache.http.cookie.Cookie[] |
getCookies(FileSystemOptions opts)
Gets the cookies to add to the request.
|
boolean |
getFollowRedirect(FileSystemOptions opts)
Gets whether to follow redirects for the connection.
|
static Http4FileSystemConfigBuilder |
getInstance()
Gets the singleton builder.
|
String |
getKeyStoreFile(FileSystemOptions opts)
Return keystore file path to be used in SSL connections.
|
String |
getKeyStoreType(FileSystemOptions opts)
Get keystore type for SSL connections.
|
int |
getMaxConnectionsPerHost(FileSystemOptions opts)
Gets the maximum number of connections allowed per host.
|
int |
getMaxTotalConnections(FileSystemOptions opts)
Gets the maximum number of connections allowed.
|
UserAuthenticator |
getProxyAuthenticator(FileSystemOptions opts)
Gets the proxy authenticator where the system should get the credentials from.
|
String |
getProxyHost(FileSystemOptions opts)
Gets the proxy to use for http connection.
|
int |
getProxyPort(FileSystemOptions opts)
Gets the proxy-port to use for http the connection.
|
String |
getProxyScheme(FileSystemOptions opts)
Gets the proxy-scheme to use for http the connection.
|
int |
getSoTimeout(FileSystemOptions opts)
Deprecated.
|
Duration |
getSoTimeoutDuration(FileSystemOptions opts)
Gets the socket timeout.
|
String |
getUrlCharset(FileSystemOptions opts)
Sets the charset used for url encoding.
|
String |
getUserAgent(FileSystemOptions opts)
Gets the user agent string
|
boolean |
isHostnameVerificationEnabled(FileSystemOptions opts)
Determines if the hostname should be verified in SSL context.
|
boolean |
isKeepAlive(FileSystemOptions opts)
Determines if the FileSystemOptions indicate that HTTP Keep-Alive is respected.
|
boolean |
isPreemptiveAuth(FileSystemOptions opts)
Determines if the FileSystemOptions indicate that preemptive authentication is requested.
|
void |
setConnectionTimeout(FileSystemOptions opts,
Duration connectionTimeout)
Sets the connection timeout.
|
void |
setConnectionTimeout(FileSystemOptions opts,
int connectionTimeout)
Deprecated.
|
void |
setCookies(FileSystemOptions opts,
org.apache.http.cookie.Cookie[] cookies)
The cookies to add to the request.
|
void |
setFollowRedirect(FileSystemOptions opts,
boolean redirect)
Sets whether to follow redirects for the connection.
|
void |
setHostnameVerificationEnabled(FileSystemOptions opts,
boolean hostnameVerificationEnabled)
Sets if the hostname should be verified in SSL context.
|
void |
setKeepAlive(FileSystemOptions opts,
boolean keepAlive)
Sets if the FileSystemOptions indicate that HTTP Keep-Alive is respected.
|
void |
setKeyStoreFile(FileSystemOptions opts,
String keyStoreFile)
Set keystore file path for SSL connections.
|
void |
setKeyStorePass(FileSystemOptions opts,
String keyStorePass)
Set keystore pass phrase for SSL connecdtions.
|
void |
setKeyStoreType(FileSystemOptions opts,
String keyStoreType)
Set keystore type for SSL connections.
|
void |
setMaxConnectionsPerHost(FileSystemOptions opts,
int maxHostConnections)
Sets the maximum number of connections allowed to any host.
|
void |
setMaxTotalConnections(FileSystemOptions opts,
int maxTotalConnections)
Sets the maximum number of connections allowed.
|
void |
setPreemptiveAuth(FileSystemOptions opts,
boolean preemptiveAuth)
Sets the given value for preemptive HTTP authentication (using BASIC) on the given FileSystemOptions object.
|
void |
setProxyAuthenticator(FileSystemOptions opts,
UserAuthenticator authenticator)
Sets the proxy authenticator where the system should get the credentials from.
|
void |
setProxyHost(FileSystemOptions opts,
String proxyHost)
Sets the proxy to use for http connection.
|
void |
setProxyPort(FileSystemOptions opts,
int proxyPort)
Sets the proxy-port to use for http connection.
|
void |
setProxyScheme(FileSystemOptions opts,
String proxyScheme)
Sets the proxy-scheme to use for http connection.
|
void |
setSoTimeout(FileSystemOptions opts,
Duration soTimeout)
Sets the socket timeout.
|
void |
setSoTimeout(FileSystemOptions opts,
int soTimeout)
Deprecated.
|
void |
setUrlCharset(FileSystemOptions opts,
String charset)
Sets the charset used for URL encoding.
|
void |
setUserAgent(FileSystemOptions opts,
String userAgent)
Sets the user agent to attach to the outgoing http methods
|
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 static final String KEY_FOLLOW_REDIRECT
This parameter expects a value of type Boolean
.
protected Http4FileSystemConfigBuilder(String prefix)
Http4FileSystemConfigBuilder
.prefix
- String for properties of this file system.public static Http4FileSystemConfigBuilder getInstance()
protected Class<? extends FileSystem> getConfigClass()
FileSystemConfigBuilder
getConfigClass
in class FileSystemConfigBuilder
@Deprecated public int getConnectionTimeout(FileSystemOptions opts)
getConnectionTimeoutDuration(FileSystemOptions)
.opts
- The FileSystem options.public Duration getConnectionTimeoutDuration(FileSystemOptions opts)
opts
- The FileSystem options.public org.apache.http.cookie.Cookie[] getCookies(FileSystemOptions opts)
opts
- The FileSystem options.public boolean getFollowRedirect(FileSystemOptions opts)
opts
- The FileSystem options.true
to follow redirects, false
not to.setFollowRedirect(org.apache.commons.vfs2.FileSystemOptions, boolean)
public String getKeyStoreFile(FileSystemOptions opts)
opts
- the file system options to modifypublic String getKeyStoreType(FileSystemOptions opts)
opts
- the file system options to modifypublic int getMaxConnectionsPerHost(FileSystemOptions opts)
opts
- The FileSystemOptions.public int getMaxTotalConnections(FileSystemOptions opts)
opts
- The FileSystemOptions.public UserAuthenticator getProxyAuthenticator(FileSystemOptions opts)
opts
- The FileSystem options.public String getProxyHost(FileSystemOptions opts)
opts
- The FileSystem options.setProxyPort(org.apache.commons.vfs2.FileSystemOptions, int)
public int getProxyPort(FileSystemOptions opts)
opts
- The FileSystem options.setProxyHost(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
public String getProxyScheme(FileSystemOptions opts)
opts
- The FileSystem options.setProxyHost(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
@Deprecated public int getSoTimeout(FileSystemOptions opts)
getSoTimeoutDuration(FileSystemOptions)
.opts
- The FileSystemOptions.public Duration getSoTimeoutDuration(FileSystemOptions opts)
opts
- The FileSystemOptions.public String getUrlCharset(FileSystemOptions opts)
opts
- The FileSystem options.public String getUserAgent(FileSystemOptions opts)
opts
- the file system options to modifypublic boolean isHostnameVerificationEnabled(FileSystemOptions opts)
opts
- The FileSystemOptions.public boolean isKeepAlive(FileSystemOptions opts)
opts
- The FileSystemOptions.public boolean isPreemptiveAuth(FileSystemOptions opts)
opts
- The FileSystemOptions.public void setConnectionTimeout(FileSystemOptions opts, Duration connectionTimeout)
opts
- The FileSystem options.connectionTimeout
- The connection timeout.@Deprecated public void setConnectionTimeout(FileSystemOptions opts, int connectionTimeout)
setConnectionTimeout(FileSystemOptions, Duration)
.opts
- The FileSystem options.connectionTimeout
- The connection timeout.public void setCookies(FileSystemOptions opts, org.apache.http.cookie.Cookie[] cookies)
opts
- The FileSystem options.cookies
- An array of Cookies.public void setFollowRedirect(FileSystemOptions opts, boolean redirect)
opts
- The FileSystem options.redirect
- true
to follow redirects, false
not to.setFollowRedirect(org.apache.commons.vfs2.FileSystemOptions, boolean)
public void setHostnameVerificationEnabled(FileSystemOptions opts, boolean hostnameVerificationEnabled)
opts
- The FileSystemOptions.hostnameVerificationEnabled
- whether hostname should be verifiedpublic void setKeepAlive(FileSystemOptions opts, boolean keepAlive)
opts
- The FileSystemOptions.keepAlive
- whether the FileSystemOptions indicate that HTTP Keep-Alive is respected or not.public void setKeyStoreFile(FileSystemOptions opts, String keyStoreFile)
opts
- the file system options to modifykeyStoreFile
- keystore file pathpublic void setKeyStorePass(FileSystemOptions opts, String keyStorePass)
opts
- the file system options to modifykeyStorePass
- keystore pass phrase for SSL connecdtionspublic void setKeyStoreType(FileSystemOptions opts, String keyStoreType)
opts
- the file system options to modifykeyStoreType
- keystore type for SSL connectionspublic void setMaxConnectionsPerHost(FileSystemOptions opts, int maxHostConnections)
opts
- The FileSystem options.maxHostConnections
- The maximum number of connections to a host.public void setMaxTotalConnections(FileSystemOptions opts, int maxTotalConnections)
opts
- The FileSystem options.maxTotalConnections
- The maximum number of connections.public void setPreemptiveAuth(FileSystemOptions opts, boolean preemptiveAuth)
opts
- The FileSystemOptions.preemptiveAuth
- the desired setting; true=enabled and false=disabled.public void setProxyAuthenticator(FileSystemOptions opts, UserAuthenticator authenticator)
opts
- The FileSystem options.authenticator
- The UserAuthenticator.public void setProxyHost(FileSystemOptions opts, String proxyHost)
You have to set the ProxyPort too if you would like to have the proxy really used.
opts
- The FileSystem options.proxyHost
- the hostsetProxyPort(org.apache.commons.vfs2.FileSystemOptions, int)
public void setProxyPort(FileSystemOptions opts, int proxyPort)
opts
- The FileSystem options.proxyPort
- the portsetProxyHost(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
public void setProxyScheme(FileSystemOptions opts, String proxyScheme)
opts
- The FileSystem options.proxyScheme
- the protocol schemesetProxyHost(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
public void setSoTimeout(FileSystemOptions opts, Duration soTimeout)
opts
- The FileSystem options.soTimeout
- socket timeout.@Deprecated public void setSoTimeout(FileSystemOptions opts, int soTimeout)
setSoTimeout(FileSystemOptions, Duration)
.opts
- The FileSystem options.soTimeout
- socket timeout.public void setUrlCharset(FileSystemOptions opts, String charset)
opts
- The FileSystem options.charset
- the charset name.public void setUserAgent(FileSystemOptions opts, String userAgent)
opts
- the file system options to modifyuserAgent
- User Agent StringCopyright © 2002–2020 The Apache Software Foundation. All rights reserved.