Class MessageProducer<T>
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Julien Viet
- See Also:
-
MessageProducer
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMessageProducer(io.vertx.core.eventbus.MessageProducer<T> delegate) Create a new instance ofMessageProducerdelegating to the given (non-null) instance ofMessageProducer.MessageProducer(io.vertx.core.eventbus.MessageProducer<T> delegate, TypeArg<T> typeArg_0) MessageProducer(Object delegate, TypeArg<T> typeArg_0) -
Method Summary
Modifier and TypeMethodDescriptionaddress()io.smallrye.mutiny.Uni<Void>close()Closes the producer, this method should be called when the message producer is not used anymore.voidCloses the producer, this method should be called when the message producer is not used anymore.Closes the producer, this method should be called when the message producer is not used anymore.deliveryOptions(io.vertx.core.eventbus.DeliveryOptions options) Update the delivery options of this producer.booleanio.vertx.core.eventbus.MessageProducer<T>Get the delegate instance.inthashCode()static <T> MessageProducer<T>newInstance(io.vertx.core.eventbus.MessageProducer<T> delegate) Creates a new instance of theMessageProducer.static <T> MessageProducer<T>newInstance(io.vertx.core.eventbus.MessageProducer<T> delegate, TypeArg<T> typeArg_0) Creates a new instance of theMessageProducer.toString()io.smallrye.mutiny.Uni<Void>Write a message to the event-bus, either sending or publishing.voidwriteAndAwait(T body) Write a message to the event-bus, either sending or publishing.writeAndForget(T body) Write a message to the event-bus, either sending or publishing.
-
Field Details
-
__TYPE_ARG
-
__typeArg_0
-
-
Constructor Details
-
MessageProducer
Create a new instance ofMessageProducerdelegating to the given (non-null) instance ofMessageProducer. -
MessageProducer
-
MessageProducer
-
-
Method Details
-
getDelegate
Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
write
Write a message to the event-bus, either sending or publishing. The returnedFuturecompletion depends on the producer type:- send or request: the uni is completed successfully if the message has been written; otherwise, the uni is failed
- publish: the uni is failed if there is no recipient; otherwise, the uni is completed successfully
Futureis not a delivery guarantee.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
body- the message body- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
io.vertx.core.eventbus.MessageProducer#write(T)
-
writeAndAwait
Write a message to the event-bus, either sending or publishing. The returnedFuturecompletion depends on the producer type:- send or request: the underlying uni is completed successfully if the message has been written; otherwise, the underlying uni is failed
- publish: the underlying uni is failed if there is no recipient; otherwise, the underlying uni is completed successfully
Futureis not a delivery guarantee.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
body- the message body- See Also:
-
io.vertx.core.eventbus.MessageProducer#write(T)
-
writeAndForget
Write a message to the event-bus, either sending or publishing. The returnedFuturecompletion depends on the producer type:- send or request: the underlying uni is completed successfully if the message has been written; otherwise, the underlying uni is failed
- publish: the underlying uni is failed if there is no recipient; otherwise, the underlying uni is completed successfully
Futureis not a delivery guarantee.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
body- the message body- Returns:
- The current instance to chain operations if needed.
- See Also:
-
io.vertx.core.eventbus.MessageProducer#write(T)
-
close
Closes the producer, this method should be called when the message producer is not used anymore.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
MessageProducer.close()
-
closeAndAwait
public void closeAndAwait()Closes the producer, this method should be called when the message producer is not used anymore.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- See Also:
-
MessageProducer.close()
-
closeAndForget
Closes the producer, this method should be called when the message producer is not used anymore.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
MessageProducer.close()
-
deliveryOptions
Update the delivery options of this producer.- Parameters:
options- the new options- Returns:
- this producer object
-
address
- Returns:
- The address to which the producer produces messages.
-
newInstance
public static <T> MessageProducer<T> newInstance(io.vertx.core.eventbus.MessageProducer<T> delegate) Creates a new instance of theMessageProducer. -
newInstance
public static <T> MessageProducer<T> newInstance(io.vertx.core.eventbus.MessageProducer<T> delegate, TypeArg<T> typeArg_0) Creates a new instance of theMessageProducer. -
hashCode
public int hashCode() -
equals
-
toString
-