public class ExecuteEventbusString extends AbstractResponse<String>
| Modifier and Type | Field and Description |
|---|---|
protected List<ExecutionStep> |
chain |
protected long |
circuitBreakerTimeout |
protected io.vertx.core.eventbus.DeliveryOptions |
deliveryOptions |
protected Consumer<Throwable> |
errorHandler |
protected Consumer<Throwable> |
errorMethodHandler |
protected ExecuteEventbusStringCall |
excecuteEventBusAndReply |
protected Throwable |
failure |
protected io.vertx.core.eventbus.Message<Object> |
message |
protected String |
methodId |
protected ThrowableErrorConsumer<Throwable,String> |
onFailureRespond |
protected int |
retryCount |
protected ThrowableFutureConsumer<String> |
stringConsumer |
protected long |
timeout |
protected VxmsShared |
vxmsShared |
| Constructor and Description |
|---|
ExecuteEventbusString(String methodId,
VxmsShared vxmsShared,
Throwable failure,
Consumer<Throwable> errorMethodHandler,
io.vertx.core.eventbus.Message<Object> message,
List<ExecutionStep> chain,
ThrowableFutureConsumer<String> stringConsumer,
ExecuteEventbusStringCall excecuteEventBusAndReply,
Consumer<Throwable> errorHandler,
ThrowableErrorConsumer<Throwable,String> 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 |
|---|---|
void |
execute()
Execute the reply chain
|
void |
execute(io.vertx.core.eventbus.DeliveryOptions deliveryOptions)
Execute the reply chain with given deliveryOptions
|
protected void |
fail(String result,
int statuscode)
The failure method
|
protected void |
respond(String result)
The respond method
|
executeBlocking, executeBlockingStep, executeStep, getBlockingResultHandler, getBlockingResultHandler, getResultHandlerprotected final String methodId
protected final VxmsShared vxmsShared
protected final Throwable failure
protected final io.vertx.core.eventbus.Message<Object> message
protected final List<ExecutionStep> chain
protected final ThrowableFutureConsumer<String> stringConsumer
protected final ThrowableErrorConsumer<Throwable,String> onFailureRespond
protected final ExecuteEventbusStringCall excecuteEventBusAndReply
protected final io.vertx.core.eventbus.DeliveryOptions deliveryOptions
protected final int retryCount
protected final long timeout
protected final long circuitBreakerTimeout
public ExecuteEventbusString(String methodId, VxmsShared vxmsShared, Throwable failure, Consumer<Throwable> errorMethodHandler, io.vertx.core.eventbus.Message<Object> message, List<ExecutionStep> chain, ThrowableFutureConsumer<String> stringConsumer, ExecuteEventbusStringCall excecuteEventBusAndReply, Consumer<Throwable> errorHandler, ThrowableErrorConsumer<Throwable,String> 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 respond tochain - the execution chainstringConsumer - the consumer, producing the byte responseexcecuteEventBusAndReply - handles the response execution after event-bus bridge replyerrorHandler - the error handleronFailureRespond - the consumer that takes a Future with the alternate response value in
case of failuredeliveryOptions - the response deliver 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 void execute(io.vertx.core.eventbus.DeliveryOptions deliveryOptions)
deliveryOptions, - the event bus Delivery Optionspublic void execute()
protected void respond(String result)
AbstractResponserespond in class AbstractResponse<String>result - the value to respondprotected void fail(String result, int statuscode)
AbstractResponsefail in class AbstractResponse<String>result - the value to respondstatuscode - the status codeCopyright © 2017. All rights reserved.