Interface AsyncClientHttpEngine
-
- All Superinterfaces:
ClientHttpEngine
- All Known Subinterfaces:
ReactiveClientHttpEngine
- All Known Implementing Classes:
ApacheHttpAsyncClient4Engine
,JettyClientEngine
,ReactorNettyClientHttpEngine
,VertxClientHttpEngine
public interface AsyncClientHttpEngine extends ClientHttpEngine
Interface for an async HttpClientEngine- Author:
- Markus Kull
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
AsyncClientHttpEngine.ResultExtractor<T>
Interface for extracting a result out of a ClientResponse
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> Future<T>
submit(ClientInvocation request, boolean buffered, javax.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 Detail
-
submit
<T> Future<T> submit(ClientInvocation request, boolean buffered, javax.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:
CompletableFuture
with 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:
CompletableFuture
with the result or Exception
-
-