Class HttpFileSystemConfigBuilder
- java.lang.Object
-
- org.apache.commons.vfs2.FileSystemConfigBuilder
-
- org.apache.commons.vfs2.provider.http.HttpFileSystemConfigBuilder
-
@Deprecated public class HttpFileSystemConfigBuilder extends FileSystemConfigBuilder
Deprecated.Useorg.apache.commons.vfs2.provider.http5
.Configuration options for HTTP.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
KEY_FOLLOW_REDIRECT
Deprecated.Keys for FileSystemOptions.protected static java.lang.String
KEY_USER_AGENT
Deprecated.Keys for FileSystemOptions.
-
Constructor Summary
Constructors Modifier Constructor Description protected
HttpFileSystemConfigBuilder(java.lang.String prefix)
Deprecated.Creates new config builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected java.lang.Class<? extends FileSystem>
getConfigClass()
Deprecated.Gets the target of this configuration.int
getConnectionTimeout(FileSystemOptions opts)
Deprecated.java.time.Duration
getConnectionTimeoutDuration(FileSystemOptions opts)
Deprecated.Gets the connection timeout.org.apache.commons.httpclient.Cookie[]
getCookies(FileSystemOptions opts)
Deprecated.Gets the cookies to add to the request.boolean
getFollowRedirect(FileSystemOptions opts)
Deprecated.Gets whether to follow redirects for the connection.static HttpFileSystemConfigBuilder
getInstance()
Deprecated.Gets the singleton builder.int
getMaxConnectionsPerHost(FileSystemOptions opts)
Deprecated.Gets the maximum number of connections allowed per host.int
getMaxTotalConnections(FileSystemOptions opts)
Deprecated.Gets the maximum number of connections allowed.UserAuthenticator
getProxyAuthenticator(FileSystemOptions opts)
Deprecated.Gets the proxy authenticator where the system should get the credentials from.java.lang.String
getProxyHost(FileSystemOptions opts)
Deprecated.Gets the proxy to use for http connection.int
getProxyPort(FileSystemOptions opts)
Deprecated.Gets the proxy-port to use for http the connection.int
getSoTimeout(FileSystemOptions opts)
Deprecated.java.time.Duration
getSoTimeoutDuration(FileSystemOptions opts)
Deprecated.Gets the socket timeout.java.lang.String
getUrlCharset(FileSystemOptions opts)
Deprecated.Gets the charset used for url encoding.java.lang.String
getUserAgent(FileSystemOptions opts)
Deprecated.Gets the user agent string.boolean
isPreemptiveAuth(FileSystemOptions opts)
Deprecated.Determines if the FileSystemOptions indicate that preemptive authentication is requested.void
setConnectionTimeout(FileSystemOptions opts, int timeout)
Deprecated.void
setConnectionTimeout(FileSystemOptions opts, java.time.Duration timeout)
Deprecated.The connection timeout.void
setCookies(FileSystemOptions opts, org.apache.commons.httpclient.Cookie[] cookies)
Deprecated.The cookies to add to the request.void
setFollowRedirect(FileSystemOptions opts, boolean redirect)
Deprecated.Sets whether to follow redirects for the connection.void
setMaxConnectionsPerHost(FileSystemOptions opts, int maxHostConnections)
Deprecated.Sets the maximum number of connections allowed to any host.void
setMaxTotalConnections(FileSystemOptions opts, int maxTotalConnections)
Deprecated.Sets the maximum number of connections allowed.void
setPreemptiveAuth(FileSystemOptions opts, boolean preemptiveAuth)
Deprecated.Sets the given value for preemptive HTTP authentication (using BASIC) on the given FileSystemOptions object.void
setProxyAuthenticator(FileSystemOptions opts, UserAuthenticator authenticator)
Deprecated.Sets the proxy authenticator where the system should get the credentials from.void
setProxyHost(FileSystemOptions opts, java.lang.String proxyHost)
Deprecated.Sets the proxy to use for http connection.void
setProxyPort(FileSystemOptions opts, int proxyPort)
Deprecated.Sets the proxy-port to use for http connection.void
setSoTimeout(FileSystemOptions opts, int timeout)
Deprecated.void
setSoTimeout(FileSystemOptions opts, java.time.Duration timeout)
Deprecated.The socket timeout.void
setUrlCharset(FileSystemOptions opts, java.lang.String charset)
Deprecated.Sets the charset used for url encoding.void
setUserAgent(FileSystemOptions opts, java.lang.String userAgent)
Deprecated.Sets the user agent to attach to the outgoing http methods.-
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
-
-
-
-
Field Detail
-
KEY_FOLLOW_REDIRECT
protected static final java.lang.String KEY_FOLLOW_REDIRECT
Deprecated.Keys for FileSystemOptions.- See Also:
- Constant Field Values
-
KEY_USER_AGENT
protected static final java.lang.String KEY_USER_AGENT
Deprecated.Keys for FileSystemOptions.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpFileSystemConfigBuilder
protected HttpFileSystemConfigBuilder(java.lang.String prefix)
Deprecated.Creates new config builder.- Parameters:
prefix
- String for properties of this file system.- Since:
- 2.0
-
-
Method Detail
-
getInstance
public static HttpFileSystemConfigBuilder getInstance()
Deprecated.Gets the singleton builder.- Returns:
- the singleton builder.
-
getConfigClass
protected java.lang.Class<? extends FileSystem> getConfigClass()
Deprecated.Description copied from class:FileSystemConfigBuilder
Gets the target of this configuration.- Specified by:
getConfigClass
in classFileSystemConfigBuilder
- Returns:
- the specific file system class
-
getConnectionTimeout
@Deprecated public int getConnectionTimeout(FileSystemOptions opts)
Deprecated.Gets the connection timeout.- Parameters:
opts
- The FileSystem options.- Returns:
- The connection timeout.
- Since:
- 2.1
-
getConnectionTimeoutDuration
public java.time.Duration getConnectionTimeoutDuration(FileSystemOptions opts)
Deprecated.Gets the connection timeout.- Parameters:
opts
- The FileSystem options.- Returns:
- The connection timeout.
- Since:
- 2.8.0
-
getCookies
public org.apache.commons.httpclient.Cookie[] getCookies(FileSystemOptions opts)
Deprecated.Gets the cookies to add to the request.- Parameters:
opts
- The FileSystem options.- Returns:
- the Cookie array.
-
getFollowRedirect
public boolean getFollowRedirect(FileSystemOptions opts)
Deprecated.Gets whether to follow redirects for the connection.- Parameters:
opts
- The FileSystem options.- Returns:
true
to follow redirects,false
not to.- Since:
- 2.1
- See Also:
setFollowRedirect(org.apache.commons.vfs2.FileSystemOptions, boolean)
-
getMaxConnectionsPerHost
public int getMaxConnectionsPerHost(FileSystemOptions opts)
Deprecated.Gets the maximum number of connections allowed per host.- Parameters:
opts
- The FileSystemOptions.- Returns:
- The maximum number of connections allowed per host.
- Since:
- 2.0
-
getMaxTotalConnections
public int getMaxTotalConnections(FileSystemOptions opts)
Deprecated.Gets the maximum number of connections allowed.- Parameters:
opts
- The FileSystemOptions.- Returns:
- The maximum number of connections allowed.
- Since:
- 2.0
-
getProxyAuthenticator
public UserAuthenticator getProxyAuthenticator(FileSystemOptions opts)
Deprecated.Gets the proxy authenticator where the system should get the credentials from.- Parameters:
opts
- The FileSystem options.- Returns:
- The UserAuthenticator.
-
getProxyHost
public java.lang.String getProxyHost(FileSystemOptions opts)
Deprecated.Gets the proxy to use for http connection. You have to set the ProxyPort too if you would like to have the proxy really used.- Parameters:
opts
- The FileSystem options.- Returns:
- proxyHost
- See Also:
setProxyPort(org.apache.commons.vfs2.FileSystemOptions, int)
-
getProxyPort
public int getProxyPort(FileSystemOptions opts)
Deprecated.Gets the proxy-port to use for http the connection. You have to set the ProxyHost too if you would like to have the proxy really used.- Parameters:
opts
- The FileSystem options.- Returns:
- proxyPort: the port number or 0 if it is not set
- See Also:
setProxyHost(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
-
getSoTimeout
@Deprecated public int getSoTimeout(FileSystemOptions opts)
Deprecated.Gets the socket timeout.- Parameters:
opts
- The FileSystemOptions.- Returns:
- The socket timeout.
- Since:
- 2.1
-
getSoTimeoutDuration
public java.time.Duration getSoTimeoutDuration(FileSystemOptions opts)
Deprecated.Gets the socket timeout.- Parameters:
opts
- The FileSystemOptions.- Returns:
- The socket timeout.
- Since:
- 2.8.0
-
getUrlCharset
public java.lang.String getUrlCharset(FileSystemOptions opts)
Deprecated.Gets the charset used for url encoding.- Parameters:
opts
- The FileSystem options.- Returns:
- the charset name.
-
getUserAgent
public java.lang.String getUserAgent(FileSystemOptions opts)
Deprecated.Gets the user agent string.- Parameters:
opts
- the file system options to modify- Returns:
- User provided User-Agent string, otherwise default of: Commons-VFS
-
isPreemptiveAuth
public boolean isPreemptiveAuth(FileSystemOptions opts)
Deprecated.Determines if the FileSystemOptions indicate that preemptive authentication is requested.- Parameters:
opts
- The FileSystemOptions.- Returns:
- true if preemptiveAuth is requested.
- Since:
- 2.0
-
setConnectionTimeout
public void setConnectionTimeout(FileSystemOptions opts, java.time.Duration timeout)
Deprecated.The connection timeout.- Parameters:
opts
- The FileSystem options.timeout
- The connection timeout.- Since:
- 2.8.0
-
setConnectionTimeout
@Deprecated public void setConnectionTimeout(FileSystemOptions opts, int timeout)
Deprecated.The connection timeout.- Parameters:
opts
- The FileSystem options.timeout
- The connection timeout.- Since:
- 2.1
-
setCookies
public void setCookies(FileSystemOptions opts, org.apache.commons.httpclient.Cookie[] cookies)
Deprecated.The cookies to add to the request.- Parameters:
opts
- The FileSystem options.cookies
- An array of Cookies.
-
setFollowRedirect
public void setFollowRedirect(FileSystemOptions opts, boolean redirect)
Deprecated.Sets whether to follow redirects for the connection.- Parameters:
opts
- The FileSystem options.redirect
-true
to follow redirects,false
not to.- Since:
- 2.1
- See Also:
setFollowRedirect(org.apache.commons.vfs2.FileSystemOptions, boolean)
-
setMaxConnectionsPerHost
public void setMaxConnectionsPerHost(FileSystemOptions opts, int maxHostConnections)
Deprecated.Sets the maximum number of connections allowed to any host.- Parameters:
opts
- The FileSystem options.maxHostConnections
- The maximum number of connections to a host.- Since:
- 2.0
-
setMaxTotalConnections
public void setMaxTotalConnections(FileSystemOptions opts, int maxTotalConnections)
Deprecated.Sets the maximum number of connections allowed.- Parameters:
opts
- The FileSystem options.maxTotalConnections
- The maximum number of connections.- Since:
- 2.0
-
setPreemptiveAuth
public void setPreemptiveAuth(FileSystemOptions opts, boolean preemptiveAuth)
Deprecated.Sets the given value for preemptive HTTP authentication (using BASIC) on the given FileSystemOptions object. Defaults to false if not set. It may be appropriate to set to true in cases when the resulting chattiness of the conversation outweighs any architectural desire to use a stronger authentication scheme than basic/preemptive.- Parameters:
opts
- The FileSystemOptions.preemptiveAuth
- the desired setting; true=enabled and false=disabled.
-
setProxyAuthenticator
public void setProxyAuthenticator(FileSystemOptions opts, UserAuthenticator authenticator)
Deprecated.Sets the proxy authenticator where the system should get the credentials from.- Parameters:
opts
- The FileSystem options.authenticator
- The UserAuthenticator.
-
setProxyHost
public void setProxyHost(FileSystemOptions opts, java.lang.String proxyHost)
Deprecated.Sets the proxy to use for http connection.You have to set the ProxyPort too if you would like to have the proxy really used.
- Parameters:
opts
- The FileSystem options.proxyHost
- the host- See Also:
setProxyPort(org.apache.commons.vfs2.FileSystemOptions, int)
-
setProxyPort
public void setProxyPort(FileSystemOptions opts, int proxyPort)
Deprecated.Sets the proxy-port to use for http connection. You have to set the ProxyHost too if you would like to have the proxy really used.- Parameters:
opts
- The FileSystem options.proxyPort
- the port- See Also:
setProxyHost(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)
-
setSoTimeout
public void setSoTimeout(FileSystemOptions opts, java.time.Duration timeout)
Deprecated.The socket timeout.- Parameters:
opts
- The FileSystem options.timeout
- socket timeout.- Since:
- 2.8.0
-
setSoTimeout
@Deprecated public void setSoTimeout(FileSystemOptions opts, int timeout)
Deprecated.The socket timeout.- Parameters:
opts
- The FileSystem options.timeout
- socket timeout.- Since:
- 2.1
-
setUrlCharset
public void setUrlCharset(FileSystemOptions opts, java.lang.String charset)
Deprecated.Sets the charset used for url encoding.- Parameters:
opts
- The FileSystem options.charset
- the charset name.
-
setUserAgent
public void setUserAgent(FileSystemOptions opts, java.lang.String userAgent)
Deprecated.Sets the user agent to attach to the outgoing http methods.- Parameters:
opts
- the file system options to modifyuserAgent
- User Agent String
-
-