public class ExecuteEventbusBasicObject extends Object
| Modifier and Type | Field and Description |
|---|---|
protected long |
circuitBreakerTimeout |
protected io.vertx.core.eventbus.DeliveryOptions |
deliveryOptions |
protected Encoder |
encoder |
protected java.util.function.Consumer<Throwable> |
errorHandler |
protected java.util.function.Consumer<Throwable> |
errorMethodHandler |
protected ExecuteEventbusObjectCall |
excecuteEventBusAndReply |
protected Throwable |
failure |
protected io.vertx.core.eventbus.Message<Object> |
message |
protected String |
methodId |
protected ThrowableFutureConsumer<Serializable> |
objectConsumer |
protected ThrowableErrorConsumer<Throwable,Serializable> |
onFailureRespond |
protected int |
retryCount |
protected long |
timeout |
protected io.vertx.core.Vertx |
vertx |
| Constructor and Description |
|---|
ExecuteEventbusBasicObject(String methodId,
io.vertx.core.Vertx vertx,
Throwable failure,
java.util.function.Consumer<Throwable> errorMethodHandler,
io.vertx.core.eventbus.Message<Object> message,
ThrowableFutureConsumer<Serializable> objectConsumer,
ExecuteEventbusObjectCall excecuteEventBusAndReply,
Encoder encoder,
java.util.function.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 |
|---|---|
void |
execute()
Execute the reply chain
|
void |
execute(io.vertx.core.eventbus.DeliveryOptions deliveryOptions)
Execute the reply chain with given http status code and content-type
|
protected void |
fail(String result,
int statuscode) |
protected void |
respond(Serializable result) |
protected final String methodId
protected final io.vertx.core.Vertx vertx
protected final Throwable failure
protected final io.vertx.core.eventbus.Message<Object> message
protected final java.util.function.Consumer<Throwable> errorHandler
protected final java.util.function.Consumer<Throwable> errorMethodHandler
protected final ThrowableFutureConsumer<Serializable> objectConsumer
protected final ThrowableErrorConsumer<Throwable,Serializable> onFailureRespond
protected final ExecuteEventbusObjectCall excecuteEventBusAndReply
protected final Encoder encoder
protected final io.vertx.core.eventbus.DeliveryOptions deliveryOptions
protected final int retryCount
protected final long timeout
protected final long circuitBreakerTimeout
public ExecuteEventbusBasicObject(String methodId, io.vertx.core.Vertx vertx, Throwable failure, java.util.function.Consumer<Throwable> errorMethodHandler, io.vertx.core.eventbus.Message<Object> message, ThrowableFutureConsumer<Serializable> objectConsumer, ExecuteEventbusObjectCall excecuteEventBusAndReply, Encoder encoder, java.util.function.Consumer<Throwable> errorHandler, ThrowableErrorConsumer<Throwable,Serializable> onFailureRespond, io.vertx.core.eventbus.DeliveryOptions deliveryOptions, int retryCount, long timeout, long circuitBreakerTimeout)
methodId - the method identifiervertx - the vertx instancefailure - the failure thrown while task executionerrorMethodHandler - the error handlermessage - the message to respond toobjectConsumer - the consumer, producing the byte responseexcecuteEventBusAndReply - handles the response execution after event-bus bridge replyencoder - 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 deliver optionsretryCount - 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 eventbus delivery optionspublic void execute()
protected void fail(String result, int statuscode)
protected void respond(Serializable result)
Copyright © 2017. All rights reserved.