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,
Callback callback)
Fetch the desired HTTP page given in
Request. |
void |
start()
Fetcher starter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinterruptAndClosepublic static AsyncFetcher buildDefault()
public static AsyncFetcher.Builder builder()
public Future<Response> fetch(Request request)
FetcherRequest.public Future<Response> fetch(Request request, Callback callback)
FetcherRequest. Executes
callback upon completion.public void start()
Fetcherpublic void close()
throws IOException
close in interface AutoCloseableIOExceptionCopyright © 2019. All rights reserved.