public class ResponseBlockingExecution extends Object
| Constructor and Description |
|---|
ResponseBlockingExecution() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
createResponseBlocking(String methodId,
ThrowableSupplier<T> supplier,
io.vertx.core.Future<ExecutionResult<T>> blockingHandler,
java.util.function.Consumer<Throwable> errorHandler,
ThrowableFunction<Throwable,T> onFailureRespond,
java.util.function.Consumer<Throwable> errorMethodHandler,
io.vertx.core.Vertx vertx,
Throwable failure,
int retry,
long timeout,
long circuitBreakerTimeout,
long delay)
Executes the response creation and handles failures
|
public static <T> void createResponseBlocking(String methodId, ThrowableSupplier<T> supplier, io.vertx.core.Future<ExecutionResult<T>> blockingHandler, java.util.function.Consumer<Throwable> errorHandler, ThrowableFunction<Throwable,T> onFailureRespond, java.util.function.Consumer<Throwable> errorMethodHandler, io.vertx.core.Vertx vertx, Throwable failure, int retry, long timeout, long circuitBreakerTimeout, long delay)
T - the type of response (String, byte, Object)methodId - the method name/id to be executedsupplier - the user defined supply method to be executed (mapToStringResponse, mapToByteResponse, mapToObjectResponse)blockingHandler - the result handler, that takes the resulterrorHandler - the intermediate error method, executed on each erroronFailureRespond - the method to be executed on failureerrorMethodHandler - the fallback methodvertx - the vertx instancefailure - last thrown Exceptionretry - the amount of retriestimeout - the max timeout time for the method executioncircuitBreakerTimeout - the stateful circuit breaker release timedelay - the delay time between retryCopyright © 2017. All rights reserved.