Package kos.core.events
Class AlwaysConsistentMessageProducer<T>
- java.lang.Object
-
- kos.core.events.AlwaysConsistentMessageProducer<T>
-
- All Implemented Interfaces:
io.vertx.core.eventbus.MessageProducer<T>
class AlwaysConsistentMessageProducer<T> extends Object implements io.vertx.core.eventbus.MessageProducer<T>
A bespokeMessageProducerimplementation designed to provide always consistent semantics when sending messages to Vertx' EventBus. This class was implemented to allowEventPublisherSinkto reliably send messages to a remote event broker, hence a few of its methods are just stubs and might fail if used outside this context.
-
-
Constructor Summary
Constructors Constructor Description AlwaysConsistentMessageProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringaddress()io.vertx.core.Future<Void>close()voidclose(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)io.vertx.core.eventbus.MessageProducer<T>deliveryOptions(io.vertx.core.eventbus.DeliveryOptions options)io.vertx.core.Future<Void>write(T body)voidwrite(T body, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
-
-
-
Field Detail
-
address
private final String address
-
eventBus
private final io.vertx.core.eventbus.EventBus eventBus
-
-
Method Detail
-
address
public String address()
- Specified by:
addressin interfaceio.vertx.core.eventbus.MessageProducer<T>
-
write
public io.vertx.core.Future<Void> write(T body)
- Specified by:
writein interfaceio.vertx.core.eventbus.MessageProducer<T>
-
close
public io.vertx.core.Future<Void> close()
- Specified by:
closein interfaceio.vertx.core.eventbus.MessageProducer<T>
-
close
public void close(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
- Specified by:
closein interfaceio.vertx.core.eventbus.MessageProducer<T>
-
deliveryOptions
public io.vertx.core.eventbus.MessageProducer<T> deliveryOptions(io.vertx.core.eventbus.DeliveryOptions options)
- Specified by:
deliveryOptionsin interfaceio.vertx.core.eventbus.MessageProducer<T>
-
-