public interface MessageProducer<T>
Modifier and Type | Method and Description |
---|---|
String |
address() |
Future<Void> |
close()
Closes the producer, this method should be called when the message producer is not used anymore.
|
void |
close(Handler<AsyncResult<Void>> handler)
Same as
close() but with an handler called when the operation completes |
MessageProducer<T> |
deliveryOptions(DeliveryOptions options)
Update the delivery options of this producer.
|
Future<Void> |
write(T body)
Like
write(Object, Handler) but returns a Future of the asynchronous result |
void |
write(T body,
Handler<AsyncResult<Void>> handler)
Write a message to the event-bus, either sending or publishing.
|
MessageProducer<T> deliveryOptions(DeliveryOptions options)
options
- the new optionsString address()
void write(T body, Handler<AsyncResult<Void>> handler)
body
- the message bodyhandler
- the handler called when the message has been successfully or failed to be written, this is not a delivery
guaranteeFuture<Void> write(T body)
write(Object, Handler)
but returns a Future
of the asynchronous resultFuture<Void> close()
void close(Handler<AsyncResult<Void>> handler)
close()
but with an handler
called when the operation completesCopyright © 2024 Eclipse. All rights reserved.