public interface AsyncClient
| Modifier and Type | Method and Description |
|---|---|
default Stream<Exception> |
close() |
<T> T |
getClient() |
default boolean |
isRunning() |
void |
registerShutdownHook()
Register the Async clients with shutdown hooks
|
<T> CompletableFuture<HttpResponse<T>> |
request(HttpRequest request,
Function<RawResponse,HttpResponse<T>> transformer,
CompletableFuture<HttpResponse<T>> callback)
Deprecated.
use the version with the resultType
|
default <T> CompletableFuture<HttpResponse<T>> |
request(HttpRequest request,
Function<RawResponse,HttpResponse<T>> transformer,
CompletableFuture<HttpResponse<T>> callback,
Class<?> resultType)
Make a Async request
|
<T> T getClient()
T - the underlying client@Deprecated <T> CompletableFuture<HttpResponse<T>> request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, CompletableFuture<HttpResponse<T>> callback)
T - The type of the bodyrequest - the prepared request objecttransformer - the function to transform the responsecallback - the CompletableFuture that will handle the eventual responsedefault <T> CompletableFuture<HttpResponse<T>> request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, CompletableFuture<HttpResponse<T>> callback, Class<?> resultType)
T - The type of the bodyrequest - the prepared request objecttransformer - the function to transform the responsecallback - the CompletableFuture that will handle the eventual responseresultType - the final body result type. This is a hint to downstream systems to make up for type erasure.default Stream<Exception> close()
default boolean isRunning()
void registerShutdownHook()
Copyright © 2023. All rights reserved.