public class ExecuteEventbusObjectResponse extends ExecuteEventbusObject
chain, circuitBreakerTimeout, deliveryOptions, encoder, errorHandler, errorMethodHandler, excecuteEventBusAndReply, failure, message, methodId, objectConsumer, onFailureRespond, retryCount, timeout, vxmsShared| Constructor and Description |
|---|
ExecuteEventbusObjectResponse(String methodId,
VxmsShared vxmsShared,
Throwable failure,
Consumer<Throwable> errorMethodHandler,
io.vertx.core.eventbus.Message<Object> message,
List<ExecutionStep> chain,
ThrowableFutureConsumer<Serializable> objectConsumer,
Encoder encoder) |
ExecuteEventbusObjectResponse(String methodId,
VxmsShared vxmsShared,
Throwable failure,
Consumer<Throwable> errorMethodHandler,
io.vertx.core.eventbus.Message<Object> message,
List<ExecutionStep> chain,
ThrowableFutureConsumer<Serializable> objectConsumer,
ExecuteEventbusObjectCall excecuteEventBusAndReply,
Encoder encoder,
Consumer<Throwable> errorHandler,
ThrowableErrorConsumer<Throwable,Serializable> onFailureRespond,
io.vertx.core.eventbus.DeliveryOptions deliveryOptions,
int retryCount,
long timeout,
long circuitBreakerTimeout)
The constructor to pass all needed members
|
| Modifier and Type | Method and Description |
|---|---|
ExecuteEventbusObjectResponse |
onError(Consumer<Throwable> errorHandler)
intermediate error handler which will be called on each error (at least 1 time, in case on N
retries... up to N times)
|
ExecuteEventbusObjectResponse |
onFailureRespond(ThrowableErrorConsumer<Throwable,Serializable> onFailureRespond,
Encoder encoder)
defines an action for errors in byte responses, you can handle the error and return an
alternate createResponse value
|
ExecuteEventbusObjectCircuitBreaker |
retry(int retryCount)
retry execution N times before
|
ExecuteEventbusObjectResponse |
timeout(long timeout)
Defines how long a method can be executed before aborted.
|
execute, execute, fail, respondexecuteBlocking, executeBlockingStep, executeStep, getBlockingResultHandler, getBlockingResultHandler, getResultHandlerpublic ExecuteEventbusObjectResponse(String methodId, VxmsShared vxmsShared, Throwable failure, Consumer<Throwable> errorMethodHandler, io.vertx.core.eventbus.Message<Object> message, List<ExecutionStep> chain, ThrowableFutureConsumer<Serializable> objectConsumer, ExecuteEventbusObjectCall excecuteEventBusAndReply, Encoder encoder, Consumer<Throwable> errorHandler, ThrowableErrorConsumer<Throwable,Serializable> onFailureRespond, io.vertx.core.eventbus.DeliveryOptions deliveryOptions, int retryCount, long timeout, long circuitBreakerTimeout)
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 handlermessage - the message to responde tochain - the execution chainobjectConsumer - the consumer, producing the byte responseexcecuteEventBusAndReply - the response of an event-bus call which is passed to the fluent
APIencoder - the encoder to serialize the response ObjecterrorHandler - the error handleronFailureRespond - the consumer that takes a Future with the alternate response value in
case of failuredeliveryOptions - the response delivery serverOptionsretryCount - the amount of retries before failure execution is triggeredtimeout - the amount of time before the execution will be abortedcircuitBreakerTimeout - the amount of time before the circuit breaker closed againpublic ExecuteEventbusObjectResponse(String methodId, VxmsShared vxmsShared, Throwable failure, Consumer<Throwable> errorMethodHandler, io.vertx.core.eventbus.Message<Object> message, List<ExecutionStep> chain, ThrowableFutureConsumer<Serializable> objectConsumer, Encoder encoder)
public ExecuteEventbusObjectResponse onFailureRespond(ThrowableErrorConsumer<Throwable,Serializable> onFailureRespond, Encoder encoder)
onFailureRespond - the handler (function) to execute on errorencoder - the encoder to serialize the response ObjectExecuteEventbusObjectResponsepublic ExecuteEventbusObjectResponse onError(Consumer<Throwable> errorHandler)
errorHandler - the handler to be executed on each errorExecuteEventbusObjectResponsepublic ExecuteEventbusObjectResponse timeout(long timeout)
timeout - the amount of timeout in msExecuteEventbusObjectResponsepublic ExecuteEventbusObjectCircuitBreaker retry(int retryCount)
retryCount - the amount of retriesExecuteEventbusObjectCircuitBreakerCopyright © 2017. All rights reserved.