public class ExecuteEventbusByte extends AbstractResponse<byte[]>
| Modifier and Type | Field and Description |
|---|---|
protected ThrowableFutureConsumer<byte[]> |
byteConsumer |
protected List<ExecutionStep> |
chain |
protected long |
circuitBreakerTimeout |
protected io.vertx.core.eventbus.DeliveryOptions |
deliveryOptions |
protected Consumer<Throwable> |
errorHandler |
protected Consumer<Throwable> |
errorMethodHandler |
protected ExecuteEventbusByteCall |
excecuteEventBusAndReply |
protected Throwable |
failure |
protected io.vertx.core.eventbus.Message<Object> |
message |
protected String |
methodId |
protected ThrowableErrorConsumer<Throwable,byte[]> |
onFailureRespond |
protected int |
retryCount |
protected long |
timeout |
protected VxmsShared |
vxmsShared |
| Constructor and Description |
|---|
ExecuteEventbusByte(String methodId,
VxmsShared vxmsShared,
Throwable failure,
Consumer<Throwable> errorMethodHandler,
io.vertx.core.eventbus.Message<Object> message,
List<ExecutionStep> chain,
ThrowableFutureConsumer<byte[]> byteConsumer,
ExecuteEventbusByteCall excecuteEventBusAndReply,
Consumer<Throwable> errorHandler,
ThrowableErrorConsumer<Throwable,byte[]> 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 http status code
|
protected void |
fail(String result,
int statuscode)
The failure method
|
protected void |
respond(byte[] 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<byte[]> byteConsumer
protected final ThrowableErrorConsumer<Throwable,byte[]> onFailureRespond
protected final ExecuteEventbusByteCall excecuteEventBusAndReply
protected final io.vertx.core.eventbus.DeliveryOptions deliveryOptions
protected final int retryCount
protected final long timeout
protected final long circuitBreakerTimeout
public ExecuteEventbusByte(String methodId, VxmsShared vxmsShared, Throwable failure, Consumer<Throwable> errorMethodHandler, io.vertx.core.eventbus.Message<Object> message, List<ExecutionStep> chain, ThrowableFutureConsumer<byte[]> byteConsumer, ExecuteEventbusByteCall excecuteEventBusAndReply, Consumer<Throwable> errorHandler, ThrowableErrorConsumer<Throwable,byte[]> 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 chainbyteConsumer - 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 b us deliver serverOptionspublic void execute()
protected void fail(String result, int statuscode)
AbstractResponsefail in class AbstractResponse<byte[]>result - the value to respondstatuscode - the status codeprotected void respond(byte[] result)
AbstractResponserespond in class AbstractResponse<byte[]>result - the value to respondCopyright © 2018. All rights reserved.