@Immutable public class HttpDriver extends FsDriver
Subclasses must be thread-safe and should be immutable!
newClient()
Constructor and Description |
---|
HttpDriver() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.http.HttpResponse |
executeGet(HttpNode entry)
Executes the GET request method for the given URI.
|
protected org.apache.http.HttpResponse |
executeHead(HttpNode entry)
Executes the HEAD request method for the given URI.
|
protected org.apache.http.client.HttpClient |
getClient()
Returns the cached http client obtained by calling
newClient() . |
protected org.apache.http.client.HttpClient |
newClient()
Returns a new http client.
|
FsController |
newController(FsManager manager,
FsModel model,
FsController parent)
Returns a new file system controller for the mount point of the
given file system model.
|
decorate, isArchiveDriver, newModel, toString
protected org.apache.http.HttpResponse executeGet(HttpNode entry) throws IOException
getClient().execute(entry.newGet())
.IOException
protected org.apache.http.HttpResponse executeHead(HttpNode entry) throws IOException
getClient().execute(entry.newHead())
.IOException
protected final org.apache.http.client.HttpClient getClient()
newClient()
.newClient()
.protected org.apache.http.client.HttpClient newClient()
The implementation in the class HttpDriver
simply returns
HttpClientBuilder.create().useSystemProperties().build()
.
If you need special configuration, e.g. for authentication or caching,
then you should override this method.
public FsController newController(FsManager manager, FsModel model, @CheckForNull FsController parent)
FsController.Factory
When called, you may assert the following precondition:
assert null == parent
? null == model.getParent()
: parent.getModel().equals(model.getParent())
manager
- the calling context.model
- the file system model.parent
- the nullable parent file system controller.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.