Class AmqpConnection
- java.lang.Object
-
- io.vertx.mutiny.amqp.AmqpConnection
-
public class AmqpConnection extends Object
Once connected to the broker or router, you get a connection. This connection is automatically opened. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<AmqpConnection>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description AmqpConnection(io.vertx.amqp.AmqpConnection delegate)
AmqpConnection(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Void>
close()
Closes the AMQP connection, i.e.Void
closeAndAwait()
Blocking variant ofclose()
.AmqpConnection
closeAndForget()
Variant ofclose()
that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>
closeFuture()
Unlike the bare Vert.x variant, this method returns aUni
.Void
closeFutureAndAwait()
Blocking variant ofcloseFuture()
.void
closeFutureAndForget()
Variant ofcloseFuture()
that ignores the result of the operation.io.smallrye.mutiny.Uni<AmqpSender>
createAnonymousSender()
Creates an anonymous sender.AmqpSender
createAnonymousSenderAndAwait()
Blocking variant ofcreateAnonymousSender()
.AmqpConnection
createAnonymousSenderAndForget()
Variant ofcreateAnonymousSender()
that ignores the result of the operation.io.smallrye.mutiny.Uni<AmqpReceiver>
createDynamicReceiver()
Creates a dynamic receiver.AmqpReceiver
createDynamicReceiverAndAwait()
Blocking variant ofcreateDynamicReceiver()
.AmqpConnection
createDynamicReceiverAndForget()
Variant ofcreateDynamicReceiver()
that ignores the result of the operation.io.smallrye.mutiny.Uni<AmqpReceiver>
createReceiver(String address)
Creates a receiver used to consume messages from the given address.io.smallrye.mutiny.Uni<AmqpReceiver>
createReceiver(String address, io.vertx.amqp.AmqpReceiverOptions receiverOptions)
Creates a receiver used to consumer messages from the given address.AmqpReceiver
createReceiverAndAwait(String address)
Blocking variant ofcreateReceiver(String)
.AmqpReceiver
createReceiverAndAwait(String address, io.vertx.amqp.AmqpReceiverOptions receiverOptions)
Blocking variant ofcreateReceiver(String,AmqpReceiverOptions)
.AmqpConnection
createReceiverAndForget(String address)
Variant ofcreateReceiver(String)
that ignores the result of the operation.AmqpConnection
createReceiverAndForget(String address, io.vertx.amqp.AmqpReceiverOptions receiverOptions)
Variant ofcreateReceiver(String,AmqpReceiverOptions)
that ignores the result of the operation.io.smallrye.mutiny.Uni<AmqpSender>
createSender(String address)
Creates a sender used to send messages to the given address.io.smallrye.mutiny.Uni<AmqpSender>
createSender(String address, io.vertx.amqp.AmqpSenderOptions options)
Creates a sender used to send messages to the given address.AmqpSender
createSenderAndAwait(String address)
Blocking variant ofcreateSender(String)
.AmqpSender
createSenderAndAwait(String address, io.vertx.amqp.AmqpSenderOptions options)
Blocking variant ofcreateSender(String,AmqpSenderOptions)
.AmqpConnection
createSenderAndForget(String address)
Variant ofcreateSender(String)
that ignores the result of the operation.AmqpConnection
createSenderAndForget(String address, io.vertx.amqp.AmqpSenderOptions options)
Variant ofcreateSender(String,AmqpSenderOptions)
that ignores the result of the operation.boolean
equals(Object o)
AmqpConnection
exceptionHandler(Consumer<Throwable> handler)
io.vertx.amqp.AmqpConnection
getDelegate()
int
hashCode()
boolean
isDisconnected()
static AmqpConnection
newInstance(io.vertx.amqp.AmqpConnection arg)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<AmqpConnection> __TYPE_ARG
-
-
Constructor Detail
-
AmqpConnection
public AmqpConnection(io.vertx.amqp.AmqpConnection delegate)
-
AmqpConnection
public AmqpConnection(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.amqp.AmqpConnection getDelegate()
-
exceptionHandler
public AmqpConnection exceptionHandler(Consumer<Throwable> handler)
- Parameters:
handler
- the exception handler.- Returns:
-
close
public io.smallrye.mutiny.Uni<Void> close()
Closes the AMQP connection, i.e. allows the Close frame to be emitted.Unlike 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
public Void 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 AmqpConnection closeAndForget()
Variant ofclose()
that ignores the result of the operation.This method subscribes on the result of
close()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromclose()
but you don't need to compose it with other operations.- Returns:
- the instance of AmqpConnection to chain method calls.
-
createReceiver
public io.smallrye.mutiny.Uni<AmqpReceiver> createReceiver(String address)
Creates a receiver used to consume messages from the given address. The receiver has no handler and won't start receiving messages until a handler is explicitly configured.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
address
- The source address to attach the consumer to, must not benull
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
createReceiverAndAwait
public AmqpReceiver createReceiverAndAwait(String address)
Blocking variant ofcreateReceiver(String)
.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:
address
- The source address to attach the consumer to, must not benull
- Returns:
- the AmqpReceiver instance produced by the operation.
-
createReceiverAndForget
public AmqpConnection createReceiverAndForget(String address)
Variant ofcreateReceiver(String)
that ignores the result of the operation.This method subscribes on the result of
createReceiver(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcreateReceiver(String)
but you don't need to compose it with other operations.- Parameters:
address
- The source address to attach the consumer to, must not benull
- Returns:
- the instance of AmqpConnection to chain method calls.
-
createReceiver
public io.smallrye.mutiny.Uni<AmqpReceiver> createReceiver(String address, io.vertx.amqp.AmqpReceiverOptions receiverOptions)
Creates a receiver used to consumer messages from the given address.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
address
- The source address to attach the consumer to.receiverOptions
- The options for this receiver.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
createReceiverAndAwait
public AmqpReceiver createReceiverAndAwait(String address, io.vertx.amqp.AmqpReceiverOptions receiverOptions)
Blocking variant ofcreateReceiver(String,AmqpReceiverOptions)
.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:
address
- The source address to attach the consumer to.receiverOptions
- The options for this receiver.- Returns:
- the AmqpReceiver instance produced by the operation.
-
createReceiverAndForget
public AmqpConnection createReceiverAndForget(String address, io.vertx.amqp.AmqpReceiverOptions receiverOptions)
Variant ofcreateReceiver(String,AmqpReceiverOptions)
that ignores the result of the operation.This method subscribes on the result of
createReceiver(String,AmqpReceiverOptions)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcreateReceiver(String,AmqpReceiverOptions)
but you don't need to compose it with other operations.- Parameters:
address
- The source address to attach the consumer to.receiverOptions
- The options for this receiver.- Returns:
- the instance of AmqpConnection to chain method calls.
-
createDynamicReceiver
public io.smallrye.mutiny.Uni<AmqpReceiver> createDynamicReceiver()
Creates a dynamic receiver. The address is provided by the broker and is available in thecompletionHandler
, using theAmqpReceiver.address()
method. this method is useful for request-reply to generate a unique reply address.Unlike 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.
-
createDynamicReceiverAndAwait
public AmqpReceiver createDynamicReceiverAndAwait()
Blocking variant ofcreateDynamicReceiver()
.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 AmqpReceiver instance produced by the operation.
-
createDynamicReceiverAndForget
public AmqpConnection createDynamicReceiverAndForget()
Variant ofcreateDynamicReceiver()
that ignores the result of the operation.This method subscribes on the result of
createDynamicReceiver()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcreateDynamicReceiver()
but you don't need to compose it with other operations.- Returns:
- the instance of AmqpConnection to chain method calls.
-
createSender
public io.smallrye.mutiny.Uni<AmqpSender> createSender(String address)
Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, checkcreateAnonymousSender()
.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
address
- The target address to attach to, must not benull
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
createSenderAndAwait
public AmqpSender createSenderAndAwait(String address)
Blocking variant ofcreateSender(String)
.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:
address
- The target address to attach to, must not benull
- Returns:
- the AmqpSender instance produced by the operation.
-
createSenderAndForget
public AmqpConnection createSenderAndForget(String address)
Variant ofcreateSender(String)
that ignores the result of the operation.This method subscribes on the result of
createSender(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcreateSender(String)
but you don't need to compose it with other operations.- Parameters:
address
- The target address to attach to, must not benull
- Returns:
- the instance of AmqpConnection to chain method calls.
-
createSender
public io.smallrye.mutiny.Uni<AmqpSender> createSender(String address, io.vertx.amqp.AmqpSenderOptions options)
Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, checkcreateAnonymousSender()
.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
address
- The target address to attach to, allowed to benull
if theoptions
configures the sender to be attached to a dynamic address (provided by the broker).options
- The AMQP sender options- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
createSenderAndAwait
public AmqpSender createSenderAndAwait(String address, io.vertx.amqp.AmqpSenderOptions options)
Blocking variant ofcreateSender(String,AmqpSenderOptions)
.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:
address
- The target address to attach to, allowed to benull
if theoptions
configures the sender to be attached to a dynamic address (provided by the broker).options
- The AMQP sender options- Returns:
- the AmqpSender instance produced by the operation.
-
createSenderAndForget
public AmqpConnection createSenderAndForget(String address, io.vertx.amqp.AmqpSenderOptions options)
Variant ofcreateSender(String,AmqpSenderOptions)
that ignores the result of the operation.This method subscribes on the result of
createSender(String,AmqpSenderOptions)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcreateSender(String,AmqpSenderOptions)
but you don't need to compose it with other operations.- Parameters:
address
- The target address to attach to, allowed to benull
if theoptions
configures the sender to be attached to a dynamic address (provided by the broker).options
- The AMQP sender options- Returns:
- the instance of AmqpConnection to chain method calls.
-
createAnonymousSender
public io.smallrye.mutiny.Uni<AmqpSender> createAnonymousSender()
Creates an anonymous sender.Unlike "regular" sender, this sender is not associated to a specific address, and each message sent must provide an address. This method can be used in request-reply scenarios where you create a sender to send the reply, but you don't know the address, as the reply address is passed into the message you are going to receive.
Unlike 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.
-
createAnonymousSenderAndAwait
public AmqpSender createAnonymousSenderAndAwait()
Blocking variant ofcreateAnonymousSender()
.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 AmqpSender instance produced by the operation.
-
createAnonymousSenderAndForget
public AmqpConnection createAnonymousSenderAndForget()
Variant ofcreateAnonymousSender()
that ignores the result of the operation.This method subscribes on the result of
createAnonymousSender()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcreateAnonymousSender()
but you don't need to compose it with other operations.- Returns:
- the instance of AmqpConnection to chain method calls.
-
isDisconnected
public boolean isDisconnected()
- Returns:
- whether the connection has been disconnected.
-
closeFuture
public io.smallrye.mutiny.Uni<Void> closeFuture()
Unlike 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.
-
closeFutureAndAwait
public Void closeFutureAndAwait()
Blocking variant ofcloseFuture()
.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.
-
closeFutureAndForget
public void closeFutureAndForget()
Variant ofcloseFuture()
that ignores the result of the operation.This method subscribes on the result of
closeFuture()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcloseFuture()
but you don't need to compose it with other operations.
-
newInstance
public static AmqpConnection newInstance(io.vertx.amqp.AmqpConnection arg)
-
-