public class AsyncRequestClient extends java.lang.Object implements RequestClient
| Modifier and Type | Class and Description |
|---|---|
static class |
AsyncRequestClient.Builder
AsyncRequestClient Builder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying HTTP client's thread pool.
|
<T> java.util.concurrent.Future<Response> |
executeAsync(Request<T> request,
ResponseCallback callback,
java.util.Map<java.lang.String,java.lang.String> headers)
Executes the HTTP request.
|
java.net.URI |
getBaseUri()
Get the base URI used for the client.
|
DefaultAsyncHttpClientConfig |
getClientConfig()
Get the client config.
|
java.util.Optional<ProxyServer> |
getProxyServer()
Get the proxy server.
|
static AsyncRequestClient.Builder |
newBuilder()
New AsyncRequestClient Builder.
|
public static AsyncRequestClient.Builder newBuilder()
public java.net.URI getBaseUri()
public java.util.Optional<ProxyServer> getProxyServer()
public DefaultAsyncHttpClientConfig getClientConfig()
public <T> java.util.concurrent.Future<Response> executeAsync(Request<T> request, ResponseCallback callback, java.util.Map<java.lang.String,java.lang.String> headers)
RequestClientexecuteAsync in interface RequestClientT - typerequest - the Request.callback - the ResponseCallback.headers - a Map of the headers.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException