public class ApiHttpAsyncClient extends Object implements HttpAsyncClient, Closeable
It is in most cases sufficient to let ApiConnection
create and manage
the HTTP client. If necessary, however, it is possible to create and manage
this type of connections manually.
@Nonnull public static ApiHttpAsyncClient of()
public boolean isRunning()
true
if started, false
otherwisepublic void start()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
- if an I/O error occurspublic <T> Future<T> execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, HttpContext context, FutureCallback<T> callback)
execute
in interface HttpAsyncClient
public <T> Future<T> execute(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, FutureCallback<T> callback)
execute
in interface HttpAsyncClient
public Future<HttpResponse> execute(HttpHost target, HttpRequest request, HttpContext context, FutureCallback<HttpResponse> callback)
execute
in interface HttpAsyncClient
public Future<HttpResponse> execute(HttpHost target, HttpRequest request, FutureCallback<HttpResponse> callback)
execute
in interface HttpAsyncClient
public Future<HttpResponse> execute(org.apache.http.client.methods.HttpUriRequest request, HttpContext context, FutureCallback<HttpResponse> callback)
execute
in interface HttpAsyncClient
public Future<HttpResponse> execute(org.apache.http.client.methods.HttpUriRequest request, FutureCallback<HttpResponse> callback)
execute
in interface HttpAsyncClient
Copyright © 2016–2019 CLX Communications. All rights reserved.