Package io.vertx.reactivex.amqp
Class AmqpClient
- java.lang.Object
-
- io.vertx.reactivex.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 RX-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(AmqpClient delegate)
AmqpClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the client.void
close(Handler<AsyncResult<Void>> closeHandler)
Closes the client.AmqpClient
connect()
Connects to the AMQP broker or router.AmqpClient
connect(Handler<AsyncResult<AmqpConnection>> connectionHandler)
Connects to the AMQP broker or router.static AmqpClient
create(AmqpClientOptions options)
Creates a new instance ofAmqpClient
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 ofAmqpClient
with the given Vert.x instance and the given options.AmqpClient
createReceiver(String address)
Creates a receiver used to consume messages from the given address.AmqpClient
createReceiver(String address, AmqpReceiverOptions receiverOptions)
Creates a receiver used to consumer messages from the given address.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.AmqpClient
createSender(String address)
Creates a sender used to send messages to the given address.AmqpClient
createSender(String address, AmqpSenderOptions options)
Creates a sender used to send messages to the given address.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.boolean
equals(Object o)
AmqpClient
getDelegate()
int
hashCode()
static AmqpClient
newInstance(AmqpClient arg)
io.reactivex.Completable
rxClose()
Closes the client.io.reactivex.Single<AmqpConnection>
rxConnect()
Connects to the AMQP broker or router.io.reactivex.Single<AmqpReceiver>
rxCreateReceiver(String address)
Creates a receiver used to consume messages from the given address.io.reactivex.Single<AmqpReceiver>
rxCreateReceiver(String address, AmqpReceiverOptions receiverOptions)
Creates a receiver used to consumer messages from the given address.io.reactivex.Single<AmqpSender>
rxCreateSender(String address)
Creates a sender used to send messages to the given address.io.reactivex.Single<AmqpSender>
rxCreateSender(String address, AmqpSenderOptions options)
Creates a sender used to send messages to the given address.String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<AmqpClient> __TYPE_ARG
-
-
Constructor Detail
-
AmqpClient
public AmqpClient(AmqpClient delegate)
-
AmqpClient
public AmqpClient(Object delegate)
-
-
Method Detail
-
getDelegate
public AmqpClient getDelegate()
-
create
public static AmqpClient create(AmqpClientOptions options)
Creates a new instance ofAmqpClient
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.- 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, AmqpClientOptions options)
Creates a new instance ofAmqpClient
with the given Vert.x instance and the given 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 AmqpClient connect(Handler<AsyncResult<AmqpConnection>> connectionHandler)
Connects to the AMQP broker or router. The location is specified in theAmqpClientOptions
as well as the potential credential required.- Parameters:
connectionHandler
- handler that will process the result, giving either the connection or failure cause. Must not benull
.- Returns:
-
connect
public AmqpClient connect()
Connects to the AMQP broker or router. The location is specified in theAmqpClientOptions
as well as the potential credential required.- Returns:
-
rxConnect
public io.reactivex.Single<AmqpConnection> rxConnect()
Connects to the AMQP broker or router. The location is specified in theAmqpClientOptions
as well as the potential credential required.- Returns:
-
close
public void close(Handler<AsyncResult<Void>> closeHandler)
Closes the client. The client must always be closed once not needed anymore.- Parameters:
closeHandler
- the close handler notified when the operation completes. It can benull
.
-
close
public void close()
Closes the client. The client must always be closed once not needed anymore.
-
rxClose
public io.reactivex.Completable rxClose()
Closes the client. The client must always be closed once not needed anymore.- Returns:
-
createReceiver
public AmqpClient createReceiver(String address, Handler<AsyncResult<AmqpReceiver>> completionHandler)
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()
.- Parameters:
address
- The source address to attach the consumer to, must not benull
completionHandler
- the handler called with the receiver. The receiver has been opened.- Returns:
- the client.
-
createReceiver
public AmqpClient 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()
.- Parameters:
address
- The source address to attach the consumer to, must not benull
- Returns:
- the client.
-
rxCreateReceiver
public io.reactivex.Single<AmqpReceiver> rxCreateReceiver(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()
.- Parameters:
address
- The source address to attach the consumer to, must not benull
- Returns:
- the client.
-
createReceiver
public AmqpClient createReceiver(String address, AmqpReceiverOptions receiverOptions, Handler<AsyncResult<AmqpReceiver>> completionHandler)
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()
.- Parameters:
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 themessageHandler
can be called before thecompletionHandler
if messages are awaiting delivery.- Returns:
- the connection.
-
createReceiver
public AmqpClient createReceiver(String address, 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()
.- Parameters:
address
- The source address to attach the consumer to.receiverOptions
- The options for this receiver.- Returns:
- the connection.
-
rxCreateReceiver
public io.reactivex.Single<AmqpReceiver> rxCreateReceiver(String address, 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()
.- Parameters:
address
- The source address to attach the consumer to.receiverOptions
- The options for this receiver.- Returns:
- the connection.
-
createSender
public AmqpClient createSender(String address, Handler<AsyncResult<AmqpSender>> completionHandler)
Creates a sender used to send messages to the given address. The address must be set.- Parameters:
address
- The target address to attach to, must not benull
completionHandler
- The handler called with the sender, once opened- Returns:
- the client.
-
createSender
public AmqpClient createSender(String address)
Creates a sender used to send messages to the given address. The address must be set.- Parameters:
address
- The target address to attach to, must not benull
- Returns:
- the client.
-
rxCreateSender
public io.reactivex.Single<AmqpSender> rxCreateSender(String address)
Creates a sender used to send messages to the given address. The address must be set.- Parameters:
address
- The target address to attach to, must not benull
- Returns:
- the client.
-
createSender
public AmqpClient createSender(String address, AmqpSenderOptions options, Handler<AsyncResult<AmqpSender>> completionHandler)
Creates a sender used to send messages to the given address. The address must be set.- Parameters:
address
- The target address to attach to, must not benull
options
- The options for this sender.completionHandler
- The handler called with the sender, once opened- Returns:
- the client.
-
createSender
public AmqpClient createSender(String address, AmqpSenderOptions options)
Creates a sender used to send messages to the given address. The address must be set.- Parameters:
address
- The target address to attach to, must not benull
options
- The options for this sender.- Returns:
- the client.
-
rxCreateSender
public io.reactivex.Single<AmqpSender> rxCreateSender(String address, AmqpSenderOptions options)
Creates a sender used to send messages to the given address. The address must be set.- Parameters:
address
- The target address to attach to, must not benull
options
- The options for this sender.- Returns:
- the client.
-
newInstance
public static AmqpClient newInstance(AmqpClient arg)
-
-