Class Http4FileSystem

All Implemented Interfaces:
Closeable, AutoCloseable, FileSystem, VfsComponent

public class Http4FileSystem extends AbstractFileSystem
http4 file system.
Since:
2.3
  • Field Details

    • internalBaseURI

      private final URI internalBaseURI
      Internal base URI of this file system.
    • httpClient

      private final org.apache.http.client.HttpClient httpClient
      Internal HttpClient instance of this file system.
    • httpClientContext

      private final org.apache.http.client.protocol.HttpClientContext httpClientContext
      Internal HttpClientContext instance of this file system.
  • Constructor Details

    • Http4FileSystem

      protected Http4FileSystem(FileName rootName, FileSystemOptions fileSystemOptions, org.apache.http.client.HttpClient httpClient, org.apache.http.client.protocol.HttpClientContext httpClientContext)
      Construct Http4FileSystem.
      Parameters:
      rootName - root base name
      fileSystemOptions - file system options
      httpClient - HttpClient instance
      httpClientContext - HttpClientContext instance
  • Method Details

    • addCapabilities

      protected void addCapabilities(Collection<Capability> caps)
      Description copied from class: AbstractFileSystem
      Adds the capabilities of this file system.
      Specified by:
      addCapabilities in class AbstractFileSystem
      Parameters:
      caps - collections of Capabilities, can be immutable.
    • createFile

      protected FileObject createFile(AbstractFileName name) throws Exception
      Description copied from class: AbstractFileSystem
      Creates a file object.

      This method is called only if the requested file is not cached.

      Specified by:
      createFile in class AbstractFileSystem
      Parameters:
      name - name referencing the new file.
      Returns:
      new created FileObject.
      Throws:
      Exception - might throw an Exception, which is then wrapped in FileSystemException.
    • doCloseCommunicationLink

      protected void doCloseCommunicationLink()
      Description copied from class: AbstractFileSystem
      Closes the underlying link used to access the files.
      Overrides:
      doCloseCommunicationLink in class AbstractFileSystem
    • getHttpClient

      protected org.apache.http.client.HttpClient getHttpClient()
      Return the internal HttpClient instance.
      Returns:
      the internal HttpClient instance
    • getHttpClientContext

      protected org.apache.http.client.protocol.HttpClientContext getHttpClientContext()
      Return the internal HttpClientContext instance.
      Returns:
      the internal HttpClientContext instance
    • getInternalBaseURI

      protected URI getInternalBaseURI()
      Return the internal base URI instance.
      Returns:
      the internal base URI instance