public class ClientUtils extends Object
| Constructor and Description |
|---|
ClientUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
blockingWait(CompletionStage<T> completionStage,
ApiHttpRequest request,
Duration duration)
Waits with a timeout for RESPONSES of a client wrapped in a
CompletionStage. |
static <T> T |
blockingWait(CompletionStage<T> completionStage,
ApiHttpRequest request,
long timeout,
TimeUnit unit)
Waits with a timeout for RESPONSES of a client wrapped in a
CompletionStage. |
static <T> T |
blockingWait(CompletionStage<T> completionStage,
Duration duration)
Waits with a timeout for RESPONSES of a client wrapped in a
CompletionStage. |
static <T> T |
blockingWait(CompletionStage<T> completionStage,
long timeout,
TimeUnit unit)
Waits with a timeout for RESPONSES of a client wrapped in a
CompletionStage. |
static <T> List<T> |
blockingWaitForEach(List<? extends CompletionStage<T>> list,
Duration duration) |
static <T> List<T> |
blockingWaitForEach(List<? extends CompletionStage<T>> list,
long timeout,
TimeUnit unit) |
static <T> List<T> |
blockingWaitForEach(Stream<? extends CompletionStage<T>> stream,
Duration duration) |
static <T> List<T> |
blockingWaitForEach(Stream<? extends CompletionStage<T>> stream,
long timeout,
TimeUnit unit) |
static <S extends CompletionStage<T>,T> |
blockingWaitForEachCollector(Duration duration) |
static <S extends CompletionStage<T>,T> |
blockingWaitForEachCollector(long timeout,
TimeUnit unit) |
public static <T> T blockingWait(CompletionStage<T> completionStage, ApiHttpRequest request, Duration duration)
CompletionStage.
This method should not be used for other CompletionStages since it is throwing BaseExceptions.T - type of the result for the requestcompletionStage - the future monad to wait forrequest - the request belonging to the completionStageduration - the maximum duration to wait for this single requestcompletionStageRmfTimeoutException - if a timeout occurspublic static <T> T blockingWait(CompletionStage<T> completionStage, Duration duration)
CompletionStage.
This method should not be used for other CompletionStages since it is throwing BaseExceptions.T - type of the result for the requestcompletionStage - the future monad to wait forduration - the maximum duration to wait for this single requestcompletionStageRmfTimeoutException - if a timeout occurspublic static <T> T blockingWait(CompletionStage<T> completionStage, long timeout, TimeUnit unit)
CompletionStage.
This method should not be used for other CompletionStages since it is throwing BaseExceptions.T - type of the result for the requestcompletionStage - the future monad to wait fortimeout - the maximum time to wait for this single requestunit - the time unit of the timeout argumentcompletionStageRmfTimeoutException - if a timeout occurspublic static <T> T blockingWait(CompletionStage<T> completionStage, ApiHttpRequest request, long timeout, TimeUnit unit)
CompletionStage.
This method should not be used for other CompletionStages since it is throwing BaseExceptions.T - type of the result for the requestcompletionStage - the future monad to wait forrequest - the request belonging to the completionStagetimeout - the maximum time to wait for this single requestunit - the time unit of the timeout argumentcompletionStageRmfTimeoutException - if a timeout occurspublic static <T> List<T> blockingWaitForEach(Stream<? extends CompletionStage<T>> stream, Duration duration)
public static <T> List<T> blockingWaitForEach(Stream<? extends CompletionStage<T>> stream, long timeout, TimeUnit unit)
public static <T> List<T> blockingWaitForEach(List<? extends CompletionStage<T>> list, Duration duration)
public static <T> List<T> blockingWaitForEach(List<? extends CompletionStage<T>> list, long timeout, TimeUnit unit)
public static <S extends CompletionStage<T>,T> Collector<S,?,List<T>> blockingWaitForEachCollector(long timeout, TimeUnit unit)
public static <S extends CompletionStage<T>,T> Collector<S,?,List<T>> blockingWaitForEachCollector(Duration duration)