Class Http4FileProvider
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractVfsContainer
org.apache.commons.vfs2.provider.AbstractFileProvider
org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider
org.apache.commons.vfs2.provider.http4.Http4FileProvider
- All Implemented Interfaces:
Closeable,AutoCloseable,FileProvider,VfsComponent
- Direct Known Subclasses:
Http4sFileProvider
FileProvider implementation using HttpComponents HttpClient library.- Since:
- 2.3
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final UserAuthenticationData.Type[]Authenticator information.(package private) static final Collection<Capability> FileProvider capabilities -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.http.conn.HttpClientConnectionManagercreateConnectionManager(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions, SSLContext sslContext, HostnameVerifier verifier) private org.apache.http.client.CookieStorecreateDefaultCookieStore(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) private org.apache.http.client.config.RequestConfigcreateDefaultRequestConfig(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) private HostnameVerifiercreateHostnameVerifier(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) protected org.apache.http.client.HttpClientcreateHttpClient(Http4FileSystemConfigBuilder builder, GenericFileName rootName, FileSystemOptions fileSystemOptions) Create anHttpClientobject for an http4 file system.protected org.apache.http.impl.client.HttpClientBuildercreateHttpClientBuilder(Http4FileSystemConfigBuilder builder, GenericFileName rootName, FileSystemOptions fileSystemOptions) Create anHttpClientBuilderobject.protected org.apache.http.client.protocol.HttpClientContextcreateHttpClientContext(Http4FileSystemConfigBuilder builder, GenericFileName rootName, FileSystemOptions fileSystemOptions, UserAuthenticationData authData) Create anHttpClientContextobject for an http4 file system.private org.apache.http.conn.routing.HttpRoutePlannercreateHttpRoutePlanner(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) protected SSLContextcreateSSLContext(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) CreateSSLContextfor HttpClient.protected FileSystemdoCreateFileSystem(FileName name, FileSystemOptions fileSystemOptions) Creates aFileSystem.Gets the file system capabilities.Returns the FileSystemConfigBuidler.private org.apache.http.HttpHostgetProxyHttpHost(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) Methods inherited from class org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider
findFile, findFile, getFileSystemMethods inherited from class org.apache.commons.vfs2.provider.AbstractFileProvider
addFileSystem, close, closeFileSystem, createFileSystem, findFileSystem, freeUnusedResources, getFileNameParser, parseUri, setFileNameParserMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsContainer
addComponent, removeComponentMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent
getContext, getLogger, init, setContext, setLogger
-
Field Details
-
AUTHENTICATOR_TYPES
Authenticator information. -
CAPABILITIES
FileProvider capabilities
-
-
Constructor Details
-
Http4FileProvider
public Http4FileProvider()Constructs a new provider.
-
-
Method Details
-
createConnectionManager
private org.apache.http.conn.HttpClientConnectionManager createConnectionManager(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions, SSLContext sslContext, HostnameVerifier verifier) -
createDefaultCookieStore
private org.apache.http.client.CookieStore createDefaultCookieStore(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) -
createDefaultRequestConfig
private org.apache.http.client.config.RequestConfig createDefaultRequestConfig(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) -
createHostnameVerifier
private HostnameVerifier createHostnameVerifier(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) -
createHttpClient
protected org.apache.http.client.HttpClient createHttpClient(Http4FileSystemConfigBuilder builder, GenericFileName rootName, FileSystemOptions fileSystemOptions) throws FileSystemException Create anHttpClientobject for an http4 file system.- Parameters:
builder- Configuration options builder for http4 providerrootName- The root pathfileSystemOptions- The file system options- Returns:
- an
HttpClientobject - Throws:
FileSystemException- if an error occurs.
-
createHttpClientBuilder
protected org.apache.http.impl.client.HttpClientBuilder createHttpClientBuilder(Http4FileSystemConfigBuilder builder, GenericFileName rootName, FileSystemOptions fileSystemOptions) throws FileSystemException Create anHttpClientBuilderobject. Invoked bycreateHttpClient(Http4FileSystemConfigBuilder, GenericFileName, FileSystemOptions).- Parameters:
builder- Configuration options builder for HTTP4 providerrootName- The root pathfileSystemOptions- The FileSystem options- Returns:
- an
HttpClientBuilderobject - Throws:
FileSystemException- if an error occurs
-
createHttpClientContext
protected org.apache.http.client.protocol.HttpClientContext createHttpClientContext(Http4FileSystemConfigBuilder builder, GenericFileName rootName, FileSystemOptions fileSystemOptions, UserAuthenticationData authData) Create anHttpClientContextobject for an http4 file system.- Parameters:
builder- Configuration options builder for http4 providerrootName- The root pathfileSystemOptions- The FileSystem optionsauthData- TheUserAuthentiationDataobject- Returns:
- an
HttpClientContextobject
-
createHttpRoutePlanner
private org.apache.http.conn.routing.HttpRoutePlanner createHttpRoutePlanner(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) -
createSSLContext
protected SSLContext createSSLContext(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) throws FileSystemException CreateSSLContextfor HttpClient. Invoked bycreateHttpClientBuilder(Http4FileSystemConfigBuilder, GenericFileName, FileSystemOptions).- Parameters:
builder- Configuration options builder for HTTP4 providerfileSystemOptions- The FileSystem options- Returns:
- a
SSLContextfor HttpClient - Throws:
FileSystemException- if an error occurs
-
doCreateFileSystem
protected FileSystem doCreateFileSystem(FileName name, FileSystemOptions fileSystemOptions) throws FileSystemException Description copied from class:AbstractOriginatingFileProviderCreates aFileSystem. If the returned FileSystem implementsVfsComponent, it will be initialized.- Specified by:
doCreateFileSystemin classAbstractOriginatingFileProvider- Parameters:
name- The name of the root file of the file system to create.fileSystemOptions- The FileSystem options.- Returns:
- The FileSystem.
- Throws:
FileSystemException- if an error occurs.
-
getCapabilities
Description copied from interface:FileProviderGets the file system capabilities.These are the same as on the file system, but available before the first file system was instanciated.
- Returns:
- a Collection of the file systems Capabilities.
-
getConfigBuilder
Description copied from class:AbstractFileProviderReturns the FileSystemConfigBuidler.- Specified by:
getConfigBuilderin interfaceFileProvider- Overrides:
getConfigBuilderin classAbstractFileProvider- Returns:
- the FileSystemConfigBuilder.
-
getProxyHttpHost
private org.apache.http.HttpHost getProxyHttpHost(Http4FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions)
-