Class AmqpClient
- java.lang.Object
-
- io.vertx.mutiny.amqp.AmqpClient
-
public class AmqpClient extends Object
AMQP Client entry point. Use this interface to create an instance ofAmqpClient
and connect to a broker and server. 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<AmqpClient>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description AmqpClient(io.vertx.amqp.AmqpClient delegate)
AmqpClient(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 client.Void
closeAndAwait()
Blocking variant ofclose()
.void
closeAndForget()
Variant ofclose()
that ignores the result of the operation.io.smallrye.mutiny.Uni<AmqpConnection>
connect()
Connects to the AMQP broker or router.AmqpConnection
connectAndAwait()
Blocking variant ofconnect()
.AmqpClient
connectAndForget()
Variant ofconnect()
that ignores the result of the operation.static AmqpClient
create(io.vertx.amqp.AmqpClientOptions options)
static AmqpClient
create(Vertx vertx, io.vertx.amqp.AmqpClientOptions options)
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)
.AmqpClient
createReceiverAndForget(String address)
Variant ofcreateReceiver(String)
that ignores the result of the operation.AmqpClient
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)
.AmqpClient
createSenderAndForget(String address)
Variant ofcreateSender(String)
that ignores the result of the operation.AmqpClient
createSenderAndForget(String address, io.vertx.amqp.AmqpSenderOptions options)
Variant ofcreateSender(String,AmqpSenderOptions)
that ignores the result of the operation.boolean
equals(Object o)
io.vertx.amqp.AmqpClient
getDelegate()
int
hashCode()
static AmqpClient
newInstance(io.vertx.amqp.AmqpClient arg)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<AmqpClient> __TYPE_ARG
-
-
Constructor Detail
-
AmqpClient
public AmqpClient(io.vertx.amqp.AmqpClient delegate)
-
AmqpClient
public AmqpClient(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.amqp.AmqpClient getDelegate()
-
create
public static AmqpClient create(io.vertx.amqp.AmqpClientOptions options)
- Parameters:
options
- the AMQP client options, may benull
falling back to the default configuration- Returns:
- the created instances.
-
create
public static AmqpClient create(Vertx vertx, io.vertx.amqp.AmqpClientOptions options)
- Parameters:
vertx
- the vert.x instance, must not benull
options
- the AMQP options, may be @{code null} falling back to the default configuration- Returns:
- the AMQP client instance
-
connect
public io.smallrye.mutiny.Uni<AmqpConnection> connect()
Connects to the AMQP broker or router. The location is specified in theAmqpClientOptions
as well as the potential credential required.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.
-
connectAndAwait
public AmqpConnection connectAndAwait()
Blocking variant ofconnect()
.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 AmqpConnection instance produced by the operation.
-
connectAndForget
public AmqpClient connectAndForget()
Variant ofconnect()
that ignores the result of the operation.This method subscribes on the result of
connect()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconnect()
but you don't need to compose it with other operations.- Returns:
- the instance of AmqpClient to chain method calls.
-
close
public io.smallrye.mutiny.Uni<Void> close()
Closes the client. The client must always be closed once not needed anymore.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 void closeAndForget()
-
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. This method avoids having to connect explicitly. You can retrieve the connection usingAmqpReceiver.connection()
.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 AmqpClient 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 AmqpClient 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. This method avoids having to connect explicitly. You can retrieve the connection usingAmqpReceiver.connection()
.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 AmqpClient 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 AmqpClient 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.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 AmqpClient 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 AmqpClient 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.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
options
- The options for this sender.- 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, must not benull
options
- The options for this sender.- Returns:
- the AmqpSender instance produced by the operation.
-
createSenderAndForget
public AmqpClient 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, must not benull
options
- The options for this sender.- Returns:
- the instance of AmqpClient to chain method calls.
-
newInstance
public static AmqpClient newInstance(io.vertx.amqp.AmqpClient arg)
-
-