T - the generic type of the responsepublic abstract class AbstractResponse<T> extends Object
| Constructor and Description |
|---|
AbstractResponse() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
executeBlocking(String methodId,
ThrowableSupplier<T> supplier,
io.vertx.core.Future<ExecutionResult<T>> blockingHandler,
Consumer<Throwable> errorHandler,
ThrowableFunction<Throwable,T> onFailureRespond,
Consumer<Throwable> errorMethodHandler,
VxmsShared vxmsShared,
Throwable failure,
int retry,
long timeout,
long circuitBreakerTimeout,
long delay) |
protected void |
executeBlockingStep(String methodId,
ThrowableFunction stepNext,
Object result,
io.vertx.core.Future<ExecutionResult<T>> handler,
Consumer<Throwable> errorHandler,
ThrowableFunction<Throwable,T> onFailureRespond,
Consumer<Throwable> errorMethodHandler,
VxmsShared vxmsShared,
Throwable failure,
int retry,
long timeout,
long circuitBreakerTimeout,
long delay) |
protected void |
executeStep(String methodId,
VxmsShared vxmsShared,
Throwable failure,
Consumer<Throwable> errorMethodHandler,
List<ExecutionStep> chainList,
T result,
ExecutionStep element,
ThrowableFutureBiConsumer step,
Consumer<Throwable> errorHandler,
ThrowableErrorConsumer<Throwable,T> onFailureRespond,
long timeout,
long circuitBreakerTimeout,
int retry)
Executes a step in the supply/andThan chain for non-blocking responses
|
protected abstract void |
fail(String result,
int statuscode)
The failure method
|
protected io.vertx.core.Handler<io.vertx.core.AsyncResult<ExecutionResult<T>>> |
getBlockingResultHandler(int retry) |
protected io.vertx.core.Handler<io.vertx.core.AsyncResult<ExecutionResult<T>>> |
getBlockingResultHandler(String methodId,
BlockingExecutionStep step,
List<BlockingExecutionStep> chainList,
Consumer<Throwable> errorHandler,
ThrowableFunction onFailureRespond,
Consumer<Throwable> errorMethodHandler,
VxmsShared vxmsShared,
Throwable failure,
int retry,
long timeout,
long circuitBreakerTimeout,
long delay) |
protected void |
getResultHandler(String methodId,
VxmsShared vxmsShared,
Throwable failure,
Consumer<Throwable> errorMethodHandler,
List<ExecutionStep> chainList,
Consumer<Throwable> errorHandler,
ThrowableErrorConsumer<Throwable,T> onFailureRespond,
long timeout,
long circuitBreakerTimeout,
int retry,
ExecutionResult<T> value) |
protected abstract void |
respond(T result)
The respond method
|
protected void executeStep(String methodId, VxmsShared vxmsShared, Throwable failure, Consumer<Throwable> errorMethodHandler, List<ExecutionStep> chainList, T result, ExecutionStep element, ThrowableFutureBiConsumer step, Consumer<Throwable> errorHandler, ThrowableErrorConsumer<Throwable,T> onFailureRespond, long timeout, long circuitBreakerTimeout, int retry)
methodId - the method identifiervxmsShared - the vxmsShared instance, containing the Vertx instance and other shared
objects per instancefailure - the failure thrown while task executionerrorMethodHandler - the error handlerchainList - the execution chainresult - the result value of the previous stepelement - the current element in stepstep - the steperrorHandler - the error handleronFailureRespond - the result execution on failuretimeout - the timeout time for executioncircuitBreakerTimeout - the time after the circuit breaker will be closedretry - the amount of retriesprotected void getResultHandler(String methodId, VxmsShared vxmsShared, Throwable failure, Consumer<Throwable> errorMethodHandler, List<ExecutionStep> chainList, Consumer<Throwable> errorHandler, ThrowableErrorConsumer<Throwable,T> onFailureRespond, long timeout, long circuitBreakerTimeout, int retry, ExecutionResult<T> value)
protected void executeBlocking(String methodId, ThrowableSupplier<T> supplier, io.vertx.core.Future<ExecutionResult<T>> blockingHandler, Consumer<Throwable> errorHandler, ThrowableFunction<Throwable,T> onFailureRespond, Consumer<Throwable> errorMethodHandler, VxmsShared vxmsShared, Throwable failure, int retry, long timeout, long circuitBreakerTimeout, long delay)
protected void executeBlockingStep(String methodId, ThrowableFunction stepNext, Object result, io.vertx.core.Future<ExecutionResult<T>> handler, Consumer<Throwable> errorHandler, ThrowableFunction<Throwable,T> onFailureRespond, Consumer<Throwable> errorMethodHandler, VxmsShared vxmsShared, Throwable failure, int retry, long timeout, long circuitBreakerTimeout, long delay)
protected io.vertx.core.Handler<io.vertx.core.AsyncResult<ExecutionResult<T>>> getBlockingResultHandler(String methodId, BlockingExecutionStep step, List<BlockingExecutionStep> chainList, Consumer<Throwable> errorHandler, ThrowableFunction onFailureRespond, Consumer<Throwable> errorMethodHandler, VxmsShared vxmsShared, Throwable failure, int retry, long timeout, long circuitBreakerTimeout, long delay)
protected io.vertx.core.Handler<io.vertx.core.AsyncResult<ExecutionResult<T>>> getBlockingResultHandler(int retry)
protected abstract void respond(T result)
result - the value to respondprotected abstract void fail(String result, int statuscode)
result - the value to respondstatuscode - the status codeCopyright © 2017. All rights reserved.