public class EventbusResponse extends Object
| Constructor and Description |
|---|
EventbusResponse(String methodId,
VxmsShared vxmsShared,
Throwable failure,
Consumer<Throwable> errorMethodHandler,
io.vertx.core.eventbus.Message<Object> message)
The constructor to pass all needed members
|
| Modifier and Type | Method and Description |
|---|---|
EventbusResponseBlocking |
blocking()
Switch to blocking mode
|
ExecuteEventbusByteResponse |
byteResponse(ThrowableFutureConsumer<byte[]> byteConsumer)
Returns a byte array to the target type
|
ExecuteEventbusObjectResponse |
objectResponse(ThrowableFutureConsumer<Serializable> objectConsumer,
Encoder encoder)
Returns a Serializable to the target type
|
ExecuteEventbusStringResponse |
stringResponse(ThrowableFutureConsumer<String> stringConsumer)
Returns a String to the target type
|
<T> ExecuteEventChainResponse<T> |
supply(ThrowableFutureConsumer<T> chainconsumer)
starts a supply chain to create a response
|
public EventbusResponse(String methodId, VxmsShared vxmsShared, Throwable failure, Consumer<Throwable> errorMethodHandler, io.vertx.core.eventbus.Message<Object> message)
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 event-bus message to respond topublic EventbusResponseBlocking blocking()
EventbusResponseBlockingpublic <T> ExecuteEventChainResponse<T> supply(ThrowableFutureConsumer<T> chainconsumer)
T - the type of the return valuechainconsumer - the initial supplierExecuteEventChainResponsepublic ExecuteEventbusByteResponse byteResponse(ThrowableFutureConsumer<byte[]> byteConsumer)
byteConsumer - consumes a io.vertx.core.Future to complete with a byte responseExecuteEventbusByteResponsepublic ExecuteEventbusStringResponse stringResponse(ThrowableFutureConsumer<String> stringConsumer)
stringConsumer - consumes a io.vertx.core.Future to complete with a String responseExecuteEventbusStringResponsepublic ExecuteEventbusObjectResponse objectResponse(ThrowableFutureConsumer<Serializable> objectConsumer, Encoder encoder)
objectConsumer - consumes a io.vertx.core.Future to complete with a Serialized Object
responseencoder - the encoder to serialize the response objectExecuteEventbusObjectResponseCopyright © 2017. All rights reserved.