public class Http5FileProvider extends AbstractOriginatingFileProvider
FileProvider
implementation using HttpComponents HttpClient v5 library.Constructor and Description |
---|
Http5FileProvider()
Constructs a new provider.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.hc.client5.http.classic.HttpClient |
createHttpClient(Http5FileSystemConfigBuilder builder,
GenericFileName rootName,
FileSystemOptions fileSystemOptions)
Create an
HttpClient object for an http4 file system. |
protected org.apache.hc.client5.http.impl.classic.HttpClientBuilder |
createHttpClientBuilder(Http5FileSystemConfigBuilder builder,
GenericFileName rootName,
FileSystemOptions fileSystemOptions)
Create an
HttpClientBuilder object. |
protected org.apache.hc.client5.http.protocol.HttpClientContext |
createHttpClientContext(Http5FileSystemConfigBuilder builder,
GenericFileName rootName,
FileSystemOptions fileSystemOptions,
UserAuthenticationData authData)
Create an
HttpClientContext object for an http4 file system. |
protected SSLContext |
createSSLContext(Http5FileSystemConfigBuilder builder,
FileSystemOptions fileSystemOptions)
Create
SSLContext for HttpClient. |
protected FileSystem |
doCreateFileSystem(FileName name,
FileSystemOptions fileSystemOptions)
Creates a
FileSystem . |
Collection<Capability> |
getCapabilities()
Gets the file system capabilities.
|
FileSystemConfigBuilder |
getConfigBuilder()
Returns the FileSystemConfigBuidler.
|
findFile, findFile, getFileSystem
addFileSystem, close, closeFileSystem, createFileSystem, findFileSystem, freeUnusedResources, getFileNameParser, parseUri, setFileNameParser
addComponent, removeComponent
getContext, getLogger, init, setContext, setLogger
protected org.apache.hc.client5.http.classic.HttpClient createHttpClient(Http5FileSystemConfigBuilder builder, GenericFileName rootName, FileSystemOptions fileSystemOptions) throws FileSystemException
HttpClient
object for an http4 file system.builder
- Configuration options builder for http4 providerrootName
- The root pathfileSystemOptions
- The file system optionsHttpClient
objectFileSystemException
- if an error occurs.protected org.apache.hc.client5.http.impl.classic.HttpClientBuilder createHttpClientBuilder(Http5FileSystemConfigBuilder builder, GenericFileName rootName, FileSystemOptions fileSystemOptions) throws FileSystemException
HttpClientBuilder
object. Invoked by createHttpClient(Http5FileSystemConfigBuilder, GenericFileName, FileSystemOptions)
.builder
- Configuration options builder for HTTP4 providerrootName
- The root pathfileSystemOptions
- The FileSystem optionsHttpClientBuilder
objectFileSystemException
- if an error occursprotected org.apache.hc.client5.http.protocol.HttpClientContext createHttpClientContext(Http5FileSystemConfigBuilder builder, GenericFileName rootName, FileSystemOptions fileSystemOptions, UserAuthenticationData authData)
HttpClientContext
object for an http4 file system.builder
- Configuration options builder for http4 providerrootName
- The root pathfileSystemOptions
- The FileSystem optionsauthData
- The UserAuthentiationData
objectHttpClientContext
objectprotected SSLContext createSSLContext(Http5FileSystemConfigBuilder builder, FileSystemOptions fileSystemOptions) throws FileSystemException
SSLContext
for HttpClient. Invoked by createHttpClientBuilder(Http5FileSystemConfigBuilder, GenericFileName, FileSystemOptions)
.builder
- Configuration options builder for HTTP4 providerfileSystemOptions
- The FileSystem optionsSSLContext
for HttpClientFileSystemException
- if an error occursprotected FileSystem doCreateFileSystem(FileName name, FileSystemOptions fileSystemOptions) throws FileSystemException
AbstractOriginatingFileProvider
FileSystem
. If the returned FileSystem implements VfsComponent
, it will be initialized.doCreateFileSystem
in class AbstractOriginatingFileProvider
name
- The name of the root file of the file system to create.fileSystemOptions
- The FileSystem options.FileSystemException
- if an error occurs.public Collection<Capability> getCapabilities()
FileProvider
These are the same as on the file system, but available before the first file system was instanciated.
public FileSystemConfigBuilder getConfigBuilder()
AbstractFileProvider
getConfigBuilder
in interface FileProvider
getConfigBuilder
in class AbstractFileProvider
Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.