public interface AmqpClient
AmqpClient
and connect to a broker and server.Modifier and Type | Method and Description |
---|---|
Future<Void> |
close()
Like
close(Handler) but returns a Future of the asynchronous result |
void |
close(Handler<AsyncResult<Void>> closeHandler)
Closes the client.
|
Future<AmqpConnection> |
connect()
Like
connect(Handler) but returns a Future of the asynchronous result |
AmqpClient |
connect(Handler<AsyncResult<AmqpConnection>> connectionHandler)
Connects to the AMQP broker or router.
|
static AmqpClient |
create(AmqpClientOptions options)
Creates a new instance of
AmqpClient using an internal Vert.x instance (with default configuration) and
the given AMQP client configuration. |
static AmqpClient |
create(Vertx vertx,
AmqpClientOptions options)
Creates a new instance of
AmqpClient with the given Vert.x instance and the given options. |
Future<AmqpReceiver> |
createReceiver(String address)
Like
createReceiver(String, Handler) but returns a Future of the asynchronous result |
Future<AmqpReceiver> |
createReceiver(String address,
AmqpReceiverOptions receiverOptions)
Like
createReceiver(String, AmqpReceiverOptions, Handler) but returns a Future of the asynchronous result |
AmqpClient |
createReceiver(String address,
AmqpReceiverOptions receiverOptions,
Handler<AsyncResult<AmqpReceiver>> completionHandler)
Creates a receiver used to consumer messages from the given address.
|
AmqpClient |
createReceiver(String address,
Handler<AsyncResult<AmqpReceiver>> completionHandler)
Creates a receiver used to consume messages from the given address.
|
Future<AmqpSender> |
createSender(String address)
Like
createSender(String, Handler) but returns a Future of the asynchronous result |
Future<AmqpSender> |
createSender(String address,
AmqpSenderOptions options)
Like
createSender(String, AmqpSenderOptions, Handler) but returns a Future of the asynchronous result |
AmqpClient |
createSender(String address,
AmqpSenderOptions options,
Handler<AsyncResult<AmqpSender>> completionHandler)
Creates a sender used to send messages to the given address.
|
AmqpClient |
createSender(String address,
Handler<AsyncResult<AmqpSender>> completionHandler)
Creates a sender used to send messages to the given address.
|
static AmqpClient create(AmqpClientOptions options)
AmqpClient
using an internal Vert.x instance (with default configuration) and
the given AMQP client configuration. Note that the created Vert.x instance will be closed when the client is
closed.options
- the AMQP client options, may be null
falling back to the default configurationstatic AmqpClient create(Vertx vertx, AmqpClientOptions options)
AmqpClient
with the given Vert.x instance and the given options.vertx
- the vert.x instance, must not be null
options
- the AMQP options, may be @{code null} falling back to the default configurationAmqpClient connect(Handler<AsyncResult<AmqpConnection>> connectionHandler)
AmqpClientOptions
as well as the
potential credential required.connectionHandler
- handler that will process the result, giving either the connection or failure cause. Must
not be null
.Future<AmqpConnection> connect()
connect(Handler)
but returns a Future
of the asynchronous resultvoid close(Handler<AsyncResult<Void>> closeHandler)
closeHandler
- the close handler notified when the operation completes. It can be null
.Future<Void> close()
close(Handler)
but returns a Future
of the asynchronous resultAmqpClient createReceiver(String address, Handler<AsyncResult<AmqpReceiver>> completionHandler)
AmqpReceiver.connection()
.address
- The source address to attach the consumer to, must not be null
completionHandler
- the handler called with the receiver. The receiver has been opened.Future<AmqpReceiver> createReceiver(String address)
createReceiver(String, Handler)
but returns a Future
of the asynchronous resultAmqpClient createReceiver(String address, AmqpReceiverOptions receiverOptions, Handler<AsyncResult<AmqpReceiver>> completionHandler)
AmqpReceiver.connection()
.address
- The source address to attach the consumer to.receiverOptions
- The options for this receiver.completionHandler
- The handler called with the receiver, once opened. Note that the messageHandler
can be called before the completionHandler
if messages are awaiting delivery.Future<AmqpReceiver> createReceiver(String address, AmqpReceiverOptions receiverOptions)
createReceiver(String, AmqpReceiverOptions, Handler)
but returns a Future
of the asynchronous resultAmqpClient createSender(String address, Handler<AsyncResult<AmqpSender>> completionHandler)
address
- The target address to attach to, must not be null
completionHandler
- The handler called with the sender, once openedFuture<AmqpSender> createSender(String address)
createSender(String, Handler)
but returns a Future
of the asynchronous resultAmqpClient createSender(String address, AmqpSenderOptions options, Handler<AsyncResult<AmqpSender>> completionHandler)
address
- The target address to attach to, must not be null
options
- The options for this sender.completionHandler
- The handler called with the sender, once openedFuture<AmqpSender> createSender(String address, AmqpSenderOptions options)
createSender(String, AmqpSenderOptions, Handler)
but returns a Future
of the asynchronous resultCopyright © 2024 Eclipse. All rights reserved.