Class Http5FileSystemConfigBuilder
java.lang.Object
org.apache.commons.vfs2.FileSystemConfigBuilder
org.apache.commons.vfs2.provider.http5.Http5FileSystemConfigBuilder
Configuration options builder utility for http5 provider.
- Since:
- 2.5.0
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final StringDefines whether the HttpClient should follow redirections from the responses.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedHttp5FileSystemConfigBuilder(String prefix) Constructs anHttp4FileSystemConfigBuilder.
- 
Method SummaryModifier and TypeMethodDescriptionprotected Class<? extends FileSystem> Gets the target of this configuration.intDeprecated.Gets the connection timeout.org.apache.hc.client5.http.cookie.Cookie[]getCookies(FileSystemOptions opts) Gets the cookies to add to the request.booleanGets whether to follow redirects for the connection.static Http5FileSystemConfigBuilderGets the singleton builder.Gets keystore file path to be used in SSL connections.Gets keystore type for SSL connections.intGets the maximum number of connections allowed per host.intGets the maximum number of connections allowed.Gets the proxy authenticator where the system should get the credentials from.Gets the proxy to use for http connection.intGets the proxy-port to use for http the connection.Gets the proxy-scheme to use for http the connection.intDeprecated.Gets the socket timeout.Gets the enabled TLS versions as a comma separated string, each token of which is the name oforg.apache.hc.core5.http.ssl.TLSenum. e.g, "V_1_2, V_1_3".Gets the charset used for url encoding.Gets the user agent string.booleanDetermines if the hostname should be verified in SSL context.booleanisKeepAlive(FileSystemOptions opts) Determines if the FileSystemOptions indicate that HTTP Keep-Alive is respected.booleanDetermines if the FileSystemOptions indicate that preemptive authentication is requested.voidsetConnectionTimeout(FileSystemOptions opts, int connectionTimeout) Deprecated.voidsetConnectionTimeout(FileSystemOptions opts, Duration connectionTimeout) Sets the connection timeout.voidsetCookies(FileSystemOptions opts, org.apache.hc.client5.http.cookie.Cookie[] cookies) The cookies to add to the request.voidsetFollowRedirect(FileSystemOptions opts, boolean redirect) Sets whether to follow redirects for the connection.voidsetHostnameVerificationEnabled(FileSystemOptions opts, boolean hostnameVerificationEnabled) Sets if the hostname should be verified in SSL context.voidsetKeepAlive(FileSystemOptions opts, boolean keepAlive) Sets if the FileSystemOptions indicate that HTTP Keep-Alive is respected.voidsetKeyStoreFile(FileSystemOptions opts, String keyStoreFile) Sets keystore file path for SSL connections.voidsetKeyStorePass(FileSystemOptions opts, String keyStorePass) Sets keystore pass phrase for SSL connections.voidsetKeyStoreType(FileSystemOptions opts, String keyStoreType) Sets keystore type for SSL connections.voidsetMaxConnectionsPerHost(FileSystemOptions opts, int maxHostConnections) Sets the maximum number of connections allowed to any host.voidsetMaxTotalConnections(FileSystemOptions opts, int maxTotalConnections) Sets the maximum number of connections allowed.voidsetPreemptiveAuth(FileSystemOptions opts, boolean preemptiveAuth) Sets the given value for preemptive HTTP authentication (using BASIC) on the given FileSystemOptions object.voidsetProxyAuthenticator(FileSystemOptions opts, UserAuthenticator authenticator) Sets the proxy authenticator where the system should get the credentials from.voidsetProxyHost(FileSystemOptions opts, String proxyHost) Sets the proxy to use for http connection.voidsetProxyPort(FileSystemOptions opts, int proxyPort) Sets the proxy-port to use for http connection.voidsetProxyScheme(FileSystemOptions opts, String proxyScheme) Sets the proxy-scheme to use for http connection.voidsetSoTimeout(FileSystemOptions opts, int soTimeout) Deprecated.voidsetSoTimeout(FileSystemOptions opts, Duration soTimeout) The socket timeout.voidsetTlsVersions(FileSystemOptions opts, String tlsVersions) Sets the enabled TLS versions as a comma separated string, each token of which is the name oforg.apache.hc.core5.http.ssl.TLSenum. e.g, "V_1_2, V_1_3".voidsetUrlCharset(FileSystemOptions opts, String charset) Sets the charset used for url encoding.voidsetUserAgent(FileSystemOptions opts, String userAgent) Sets the user agent to attach to the outgoing http methods.Methods inherited from class org.apache.commons.vfs2.FileSystemConfigBuildergetBoolean, 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 Details- 
KEY_FOLLOW_REDIRECTDefines whether the HttpClient should follow redirections from the responses.This parameter expects a value of type Boolean.- See Also:
 
 
- 
- 
Constructor Details- 
Http5FileSystemConfigBuilderConstructs anHttp4FileSystemConfigBuilder.- Parameters:
- prefix- String for properties of this file system.
 
 
- 
- 
Method Details- 
getInstanceGets the singleton builder.- Returns:
- the singleton builder.
 
- 
getConfigClassDescription copied from class:FileSystemConfigBuilderGets the target of this configuration.- Specified by:
- getConfigClassin class- FileSystemConfigBuilder
- Returns:
- the specific file system class
 
- 
getConnectionTimeoutDeprecated.Gets the connection timeout.- Parameters:
- opts- The FileSystem options.
- Returns:
- The connection timeout.
 
- 
getConnectionTimeoutDurationGets the connection timeout.- Parameters:
- opts- The FileSystem options.
- Returns:
- The connection timeout.
- Since:
- 2.8.0
 
- 
getCookiesGets the cookies to add to the request.- Parameters:
- opts- The FileSystem options.
- Returns:
- the Cookie array.
 
- 
getFollowRedirectGets whether to follow redirects for the connection.- Parameters:
- opts- The FileSystem options.
- Returns:
- trueto follow redirects,- falsenot to.
- See Also:
 
- 
getKeyStoreFileGets keystore file path to be used in SSL connections.- Parameters:
- opts- the file system options to modify
- Returns:
- keystore file path to be used in SSL connections
 
- 
getKeyStoreTypeGets keystore type for SSL connections.- Parameters:
- opts- the file system options to modify
- Returns:
- keystore type for SSL connections
- Since:
- 2.7.0
 
- 
getMaxConnectionsPerHostGets the maximum number of connections allowed per host.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- The maximum number of connections allowed per host.
 
- 
getMaxTotalConnectionsGets the maximum number of connections allowed.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- The maximum number of connections allowed.
 
- 
getProxyAuthenticatorGets the proxy authenticator where the system should get the credentials from.- Parameters:
- opts- The FileSystem options.
- Returns:
- The UserAuthenticator.
 
- 
getProxyHostGets 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:
 
- 
getProxyPortGets 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:
 
- 
getProxySchemeGets the proxy-scheme 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:
- proxyScheme: the http/https scheme of proxy server
- Since:
- 2.7.0
- See Also:
 
- 
getSoTimeoutDeprecated.Gets the socket timeout.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- The socket timeout.
 
- 
getSoTimeoutDurationGets the socket timeout.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- The socket timeout.
- Since:
- 2.8.0
 
- 
getTlsVersionsGets the enabled TLS versions as a comma separated string, each token of which is the name oforg.apache.hc.core5.http.ssl.TLSenum. e.g, "V_1_2, V_1_3".- Parameters:
- opts- the file system options to modify
- Returns:
- enabled TLS versions
 
- 
getUrlCharsetGets the charset used for url encoding.- Parameters:
- opts- The FileSystem options.
- Returns:
- the charset name
 
- 
getUserAgentGets the user agent string.- Parameters:
- opts- the file system options to modify
- Returns:
- User provided User-Agent string, otherwise default of: Commons-VFS
 
- 
isHostnameVerificationEnabledDetermines if the hostname should be verified in SSL context.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- true if the FileSystemOptions indicate that HTTP Keep-Alive is respected.
 
- 
isKeepAliveDetermines if the FileSystemOptions indicate that HTTP Keep-Alive is respected.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- true if the FileSystemOptions indicate that HTTP Keep-Alive is respected.
 
- 
isPreemptiveAuthDetermines if the FileSystemOptions indicate that preemptive authentication is requested.- Parameters:
- opts- The FileSystemOptions.
- Returns:
- true if preemptiveAuth is requested.
 
- 
setConnectionTimeoutSets the connection timeout.- Parameters:
- opts- The FileSystem options.
- connectionTimeout- The connection timeout.
- Since:
- 2.8.0
 
- 
setConnectionTimeoutDeprecated.Sets the connection timeout.- Parameters:
- opts- The FileSystem options.
- connectionTimeout- The connection timeout.
 
- 
setCookiesThe cookies to add to the request.- Parameters:
- opts- The FileSystem options.
- cookies- An array of Cookies.
 
- 
setFollowRedirectSets whether to follow redirects for the connection.- Parameters:
- opts- The FileSystem options.
- redirect-- trueto follow redirects,- falsenot to.
- See Also:
 
- 
setHostnameVerificationEnabledpublic void setHostnameVerificationEnabled(FileSystemOptions opts, boolean hostnameVerificationEnabled) Sets if the hostname should be verified in SSL context.- Parameters:
- opts- The FileSystemOptions.
- hostnameVerificationEnabled- whether hostname should be verified
 
- 
setKeepAliveSets if the FileSystemOptions indicate that HTTP Keep-Alive is respected.- Parameters:
- opts- The FileSystemOptions.
- keepAlive- whether the FileSystemOptions indicate that HTTP Keep-Alive is respected or not.
 
- 
setKeyStoreFileSets keystore file path for SSL connections.- Parameters:
- opts- the file system options to modify
- keyStoreFile- keystore file path
 
- 
setKeyStorePassSets keystore pass phrase for SSL connections.- Parameters:
- opts- the file system options to modify
- keyStorePass- keystore pass phrase for SSL connections
 
- 
setKeyStoreTypeSets keystore type for SSL connections.- Parameters:
- opts- the file system options to modify
- keyStoreType- keystore type for SSL connections
- Since:
- 2.7.0
 
- 
setMaxConnectionsPerHostSets the maximum number of connections allowed to any host.- Parameters:
- opts- The FileSystem options.
- maxHostConnections- The maximum number of connections to a host.
 
- 
setMaxTotalConnectionsSets the maximum number of connections allowed.- Parameters:
- opts- The FileSystem options.
- maxTotalConnections- The maximum number of connections.
 
- 
setPreemptiveAuthSets 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.
 
- 
setProxyAuthenticatorSets the proxy authenticator where the system should get the credentials from.- Parameters:
- opts- The FileSystem options.
- authenticator- The UserAuthenticator.
 
- 
setProxyHostSets 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:
 
- 
setProxyPortSets 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:
 
- 
setProxySchemeSets the proxy-scheme 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.
- proxyScheme- the protocol scheme
- Since:
- 2.7.0
- See Also:
 
- 
setSoTimeoutThe socket timeout.- Parameters:
- opts- The FileSystem options.
- soTimeout- socket timeout.
 
- 
setSoTimeoutDeprecated.Sets the socket timeout.- Parameters:
- opts- The FileSystem options.
- soTimeout- socket timeout.
 
- 
setTlsVersionsSets the enabled TLS versions as a comma separated string, each token of which is the name oforg.apache.hc.core5.http.ssl.TLSenum. e.g, "V_1_2, V_1_3".- Parameters:
- opts- the file system options to modify
- tlsVersions- enabled TLS versions
 
- 
setUrlCharsetSets the charset used for url encoding.- Parameters:
- opts- The FileSystem options.
- charset- the charset name.
 
- 
setUserAgentSets the user agent to attach to the outgoing http methods.- Parameters:
- opts- the file system options to modify
- userAgent- User Agent String
 
 
- 
getConnectionTimeoutDuration(FileSystemOptions).