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) |
javax.ws.rs.core.Response |
invoke(javax.ws.rs.client.Invocation request) |
<T> CompletableFuture<T> |
submit(ClientInvocation request,
boolean buffered,
AsyncClientHttpEngine.ResultExtractor<T> extractor,
ExecutorService executorService)
Submits an asynchronous request.
|
<T> Future<T> |
submit(ClientInvocation request,
boolean buffered,
javax.ws.rs.client.InvocationCallback<T> callback,
AsyncClientHttpEngine.ResultExtractor<T> extractor)
Submits an asynchronous request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsubmitisFollowRedirects, setFollowRedirectsprotected 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 Closeableclose in interface AutoCloseableclose in interface ClientHttpEnginepublic SSLContext getSslContext()
ClientHttpEnginegetSslContext in interface ClientHttpEngineSSLContextpublic HostnameVerifier getHostnameVerifier()
ClientHttpEnginegetHostnameVerifier in interface ClientHttpEngineHostnameVerifierpublic javax.ws.rs.core.Response invoke(javax.ws.rs.client.Invocation request)
public ClientResponse invoke(ClientInvocation request)
invoke in interface ClientHttpEnginepublic <T> Future<T> submit(ClientInvocation request, boolean buffered, javax.ws.rs.client.InvocationCallback<T> callback, AsyncClientHttpEngine.ResultExtractor<T> extractor)
AsyncClientHttpEnginesubmit in interface AsyncClientHttpEngineT - 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-threadpublic <T> CompletableFuture<T> submit(ClientInvocation request, boolean buffered, AsyncClientHttpEngine.ResultExtractor<T> extractor, ExecutorService executorService)
AsyncClientHttpEnginesubmit in interface AsyncClientHttpEngineT - typerequest - Requestbuffered - buffer the response?extractor - ResultExtractor for extracting a result out of a ClientResponse. Is run inside the io-threadexecutorService - the executor to use for asynchronous executionCompletableFuture with the result or ExceptionCopyright © 2023 JBoss by Red Hat. All rights reserved.