public class EventbusResponse extends Object
| Constructor and Description |
|---|
EventbusResponse(String methodId,
io.vertx.core.eventbus.Message<Object> message,
VxmsShared vxmsShared,
Throwable failure,
java.util.function.Consumer<Throwable> errorMethodHandler)
The constructor to pass all needed members
|
| Modifier and Type | Method and Description |
|---|---|
EventbusResponseBlocking |
blocking()
Switch to blocking mode
|
ExecuteEventbusBasicByteResponse |
byteResponse(ThrowableFutureConsumer<byte[]> byteConsumer)
Returns a byte array to the target type
|
ExecuteEventbusBasicObjectResponse |
objectResponse(ThrowableFutureConsumer<Serializable> objectConsumer,
Encoder encoder)
Returns a Serializable to the target type
|
ExecuteEventbusBasicStringResponse |
stringResponse(ThrowableFutureConsumer<String> stringConsumer)
Returns a String to the target type
|
public EventbusResponse(String methodId, io.vertx.core.eventbus.Message<Object> message, VxmsShared vxmsShared, Throwable failure, java.util.function.Consumer<Throwable> errorMethodHandler)
methodId - the method identifiermessage - the event-bus message to respond tovxmsShared - the vxmsShared instance, containing the Vertx instance and other shared
objects per instancefailure - the failure thrown while task executionerrorMethodHandler - the error handlerpublic EventbusResponseBlocking blocking()
EventbusResponseBlockingpublic ExecuteEventbusBasicByteResponse byteResponse(ThrowableFutureConsumer<byte[]> byteConsumer)
byteConsumer - consumes a io.vertx.core.Future to compleate with a byte responseExecuteEventbusBasicByteResponsepublic ExecuteEventbusBasicStringResponse stringResponse(ThrowableFutureConsumer<String> stringConsumer)
stringConsumer - consumes a io.vertx.core.Future to compleate with a String responseExecuteEventbusBasicStringResponsepublic ExecuteEventbusBasicObjectResponse objectResponse(ThrowableFutureConsumer<Serializable> objectConsumer, Encoder encoder)
objectConsumer - consumes a io.vertx.core.Future to compleate with a Serialized Object
responseencoder - the encoder to serialize the response objectExecuteEventbusBasicObjectResponseCopyright © 2017. All rights reserved.