Class Http4FileSystem
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractFileSystem
org.apache.commons.vfs2.provider.http4.Http4FileSystem
- All Implemented Interfaces:
Closeable,AutoCloseable,FileSystem,VfsComponent
http4 file system.
- Since:
- 2.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.http.client.HttpClientInternalHttpClientinstance of this file system.private final org.apache.http.client.protocol.HttpClientContextInternalHttpClientContextinstance of this file system.private final URIInternal base URI of this file system. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttp4FileSystem(FileName rootName, FileSystemOptions fileSystemOptions, org.apache.http.client.HttpClient httpClient, org.apache.http.client.protocol.HttpClientContext httpClientContext) ConstructHttp4FileSystem. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCapabilities(Collection<Capability> caps) Adds the capabilities of this file system.protected FileObjectcreateFile(AbstractFileName name) Creates a file object.protected voidCloses the underlying link used to access the files.protected org.apache.http.client.HttpClientReturn the internalHttpClientinstance.protected org.apache.http.client.protocol.HttpClientContextReturn the internalHttpClientContextinstance.protected URIReturn the internal baseURIinstance.Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileSystem
addJunction, addListener, close, closeCommunicationLink, decorateFileObject, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, init, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttributeMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent
getContext, getLogger, setContext, setLogger
-
Field Details
-
internalBaseURI
Internal base URI of this file system. -
httpClient
private final org.apache.http.client.HttpClient httpClientInternalHttpClientinstance of this file system. -
httpClientContext
private final org.apache.http.client.protocol.HttpClientContext httpClientContextInternalHttpClientContextinstance 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) ConstructHttp4FileSystem.- Parameters:
rootName- root base namefileSystemOptions- file system optionshttpClient-HttpClientinstancehttpClientContext-HttpClientContextinstance
-
-
Method Details
-
addCapabilities
Description copied from class:AbstractFileSystemAdds the capabilities of this file system.- Specified by:
addCapabilitiesin classAbstractFileSystem- Parameters:
caps- collections of Capabilities, can be immutable.
-
createFile
Description copied from class:AbstractFileSystemCreates a file object.This method is called only if the requested file is not cached.
- Specified by:
createFilein classAbstractFileSystem- 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:AbstractFileSystemCloses the underlying link used to access the files.- Overrides:
doCloseCommunicationLinkin classAbstractFileSystem
-
getHttpClient
protected org.apache.http.client.HttpClient getHttpClient()Return the internalHttpClientinstance.- Returns:
- the internal
HttpClientinstance
-
getHttpClientContext
protected org.apache.http.client.protocol.HttpClientContext getHttpClientContext()Return the internalHttpClientContextinstance.- Returns:
- the internal
HttpClientContextinstance
-
getInternalBaseURI
Return the internal baseURIinstance.- Returns:
- the internal base
URIinstance
-