@Immutable public class HttpDriver extends FsDriver
Subclasses must be thread-safe and should be immutable!
newClient()| Constructor and Description |
|---|
HttpDriver(IOPoolProvider provider) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.http.HttpResponse |
executeGet(HttpEntry entry)
Executes the GET request method for the given URI.
|
protected org.apache.http.HttpResponse |
executeHead(HttpEntry 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(FsModel model,
FsController<?> parent) |
getPriority, isFederated, newController, toStringpublic HttpDriver(IOPoolProvider provider)
protected org.apache.http.HttpResponse executeGet(HttpEntry entry) throws IOException
getClient().execute(entry.newGet()).IOExceptionprotected org.apache.http.HttpResponse executeHead(HttpEntry entry) throws IOException
getClient().execute(entry.newHead()).IOExceptionprotected final org.apache.http.client.HttpClient getClient()
newClient().newClient().protected org.apache.http.client.HttpClient newClient()
The implementation in the class HttpDriver simply returns
new DefaultHttpClient(new ThreadSafeClientConnManager()).
If you need special configuration, e.g. for authentication or caching,
then you should override this method.
public FsController<?> newController(FsModel model, @CheckForNull FsController<?> parent)
newController in class FsDriverCopyright © 2005-2013 Schlichtherle IT Services. All Rights Reserved.