public class ApacheHttpAsyncClient4Engine extends Object implements AsyncClientHttpEngine, Closeable
Some words of caution:
AsyncClientHttpEngine.ResultExtractor<T>
Modifier and Type | Field and Description |
---|---|
protected org.apache.http.impl.nio.client.CloseableHttpAsyncClient |
client |
protected boolean |
closeHttpClient |
Constructor and Description |
---|
ApacheHttpAsyncClient4Engine(org.apache.http.impl.nio.client.CloseableHttpAsyncClient client,
boolean closeHttpClient) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
HostnameVerifier |
getHostnameVerifier()
Needed for Client.getHostnameVerifier()
|
SSLContext |
getSslContext()
Needed for Client.getSslContext();
|
ClientResponse |
invoke(ClientInvocation request) |
<T> Future<T> |
submit(ClientInvocation request,
boolean buffered,
InvocationCallback<T> callback,
AsyncClientHttpEngine.ResultExtractor<T> extractor)
Submits an asynchronous request.
|
protected final org.apache.http.impl.nio.client.CloseableHttpAsyncClient client
protected final boolean closeHttpClient
public ApacheHttpAsyncClient4Engine(org.apache.http.impl.nio.client.CloseableHttpAsyncClient client, boolean closeHttpClient)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ClientHttpEngine
public SSLContext getSslContext()
ClientHttpEngine
getSslContext
in interface ClientHttpEngine
SSLContext
public HostnameVerifier getHostnameVerifier()
ClientHttpEngine
getHostnameVerifier
in interface ClientHttpEngine
HostnameVerifier
public ClientResponse invoke(ClientInvocation request)
invoke
in interface ClientHttpEngine
public <T> Future<T> submit(ClientInvocation request, boolean buffered, InvocationCallback<T> callback, AsyncClientHttpEngine.ResultExtractor<T> extractor)
AsyncClientHttpEngine
submit
in interface AsyncClientHttpEngine
T
- typerequest
- Requestbuffered
- buffer the response?callback
- Optional callback receiving the result, which is run inside the io-thread. may be null.extractor
- ResultExtractor for extracting a result out of a ClientResponse. Is run inside the io-threadCopyright © 2019 JBoss by Red Hat. All rights reserved.