Class MessageProducer<T>
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMessageProducer
(io.vertx.core.eventbus.MessageProducer delegate) MessageProducer
(io.vertx.core.eventbus.MessageProducer delegate, TypeArg<T> typeArg_0) MessageProducer
(Object delegate, TypeArg<T> typeArg_0) -
Method Summary
Modifier and TypeMethodDescriptionaddress()
io.smallrye.mutiny.Uni<Void>
close()
Same asclose()
but with anhandler
called when the operation completesBlocking variant ofclose()
.void
Variant ofclose()
that ignores the result of the operation.deliveryOptions
(io.vertx.core.eventbus.DeliveryOptions options) boolean
io.vertx.core.eventbus.MessageProducer
int
hashCode()
static <T> MessageProducer<T>
newInstance
(io.vertx.core.eventbus.MessageProducer arg) static <T> MessageProducer<T>
newInstance
(io.vertx.core.eventbus.MessageProducer arg, TypeArg<T> __typeArg_T) toString()
io.smallrye.mutiny.Uni<Void>
Write a message to the event-bus, either sending or publishing.writeAndAwait
(T body) Blocking variant ofwrite(T)
.void
writeAndForget
(T body) Variant ofwrite(T)
that ignores the result of the operation.
-
Field Details
-
__TYPE_ARG
-
__typeArg_0
-
-
Constructor Details
-
MessageProducer
public MessageProducer(io.vertx.core.eventbus.MessageProducer delegate) -
MessageProducer
-
MessageProducer
-
-
Method Details
-
getDelegate
public io.vertx.core.eventbus.MessageProducer getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
deliveryOptions
- Parameters:
options
- the new options- Returns:
- this producer object
-
address
- Returns:
- The address to which the producer produces messages.
-
write
Write a message to the event-bus, either sending or publishing. Thehandler
completion depends on the producer type:- send or request: the handler is completed successfully if the message has been written; otherwise, the handler is failed
- publish: the handler is failed if there is no recipient; otherwise, the handler is completed successfully
handler
is not a delivery guarantee.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
body
- the message body- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
writeAndAwait
Blocking variant ofwrite(T)
.This method waits 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 a RuntimeException).
- Parameters:
body
- the message body- Returns:
- the Void instance produced by the operation.
-
writeAndForget
Variant ofwrite(T)
that ignores the result of the operation.This method subscribes on the result of
write(T)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromwrite(T)
but you don't need to compose it with other operations.- Parameters:
body
- the message body
-
close
Same asclose()
but with anhandler
called when the operation completesUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
Blocking variant ofclose()
.This method waits 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 a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
closeAndForget
public void closeAndForget() -
newInstance
-
newInstance
public static <T> MessageProducer<T> newInstance(io.vertx.core.eventbus.MessageProducer arg, TypeArg<T> __typeArg_T)
-