public class AsyncFetcher extends Object implements Fetcher
| Modifier and Type | Class and Description |
|---|---|
static class |
AsyncFetcher.Builder
A builder for async fetcher class.
|
| Modifier and Type | Method and Description |
|---|---|
static AsyncFetcher |
buildDefault()
Create an instance of async fetcher with default options.
|
static AsyncFetcher.Builder |
builder()
Create an instance of builder.
|
void |
close() |
Future<Response> |
fetch(Request request)
Fetch the desired HTTP page given in
Request. |
Future<Response> |
fetch(Request request,
org.apache.http.concurrent.FutureCallback<Response> callback)
Fetch the desired HTTP page given in
Request. |
void |
start()
Fetcher starter.
|
public static AsyncFetcher buildDefault()
public static AsyncFetcher.Builder builder()
public Future<Response> fetch(Request request)
FetcherRequest.public Future<Response> fetch(Request request, org.apache.http.concurrent.FutureCallback<Response> callback)
FetcherRequest. Executes
callback upon completion.public void start()
Fetcherpublic void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2018. All rights reserved.