Interface AsyncClientHttpEngine
- All Superinterfaces:
ClientHttpEngine
- All Known Subinterfaces:
ReactiveClientHttpEngine
- All Known Implementing Classes:
ApacheHttpAsyncClient4Engine,JettyClientEngine,ReactorNettyClientHttpEngine,VertxClientHttpEngine
Interface for an async HttpClientEngine
- Author:
- Markus Kull
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface for extracting a result out of a ClientResponse -
Method Summary
Modifier and TypeMethodDescription<T> Future<T> submit(ClientInvocation request, boolean buffered, jakarta.ws.rs.client.InvocationCallback<T> callback, AsyncClientHttpEngine.ResultExtractor<T> extractor) Submits an asynchronous request.default <T> CompletableFuture<T> submit(ClientInvocation request, boolean buffered, AsyncClientHttpEngine.ResultExtractor<T> extractor) Submits an asynchronous request.<T> CompletableFuture<T> submit(ClientInvocation request, boolean buffered, AsyncClientHttpEngine.ResultExtractor<T> extractor, ExecutorService executorService) Submits an asynchronous request.Methods inherited from interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine
close, getHostnameVerifier, getSslContext, invoke, isFollowRedirects, setFollowRedirects
-
Method Details
-
submit
<T> Future<T> submit(ClientInvocation request, boolean buffered, jakarta.ws.rs.client.InvocationCallback<T> callback, AsyncClientHttpEngine.ResultExtractor<T> extractor) Submits an asynchronous request.- Type Parameters:
T- type- Parameters:
request- 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-thread- Returns:
- Future with the result or Exception
-
submit
default <T> CompletableFuture<T> submit(ClientInvocation request, boolean buffered, AsyncClientHttpEngine.ResultExtractor<T> extractor) Submits an asynchronous request.- Type Parameters:
T- type- Parameters:
request- Requestbuffered- buffer the response?extractor- ResultExtractor for extracting a result out of a ClientResponse. Is run inside the io-thread- Returns:
CompletableFuturewith the result or Exception
-
submit
<T> CompletableFuture<T> submit(ClientInvocation request, boolean buffered, AsyncClientHttpEngine.ResultExtractor<T> extractor, ExecutorService executorService) Submits an asynchronous request.- Type Parameters:
T- type- Parameters:
request- 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 execution- Returns:
CompletableFuturewith the result or Exception
-