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)
Fetcher
Request
.public Future<Response> fetch(Request request, org.apache.http.concurrent.FutureCallback<Response> callback)
Fetcher
Request
. Executes
callback upon completion.public void start()
Fetcher
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2018. All rights reserved.