Class AmqpConnection
java.lang.Object
io.vertx.reactivex.amqp.AmqpConnection
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclose()Closes the AMQP connection, i.e. allows the Close frame to be emitted.Creates an anonymous sender.Creates a dynamic receiver.createReceiver(String address) Creates a receiver used to consume messages from the given address.createReceiver(String address, AmqpReceiverOptions receiverOptions) Creates a receiver used to consumer messages from the given address.createSender(String address) Creates a sender used to send messages to the given address.createSender(String address, AmqpSenderOptions options) Creates a sender used to send messages to the given address.booleanexceptionHandler(Handler<Throwable> handler) Registers a handler called on disconnection.inthashCode()booleanstatic AmqpConnectionrxClose()Closes the AMQP connection, i.e. allows the Close frame to be emitted.Creates an anonymous sender.Creates a dynamic receiver.rxCreateReceiver(String address) Creates a receiver used to consume messages from the given address.rxCreateReceiver(String address, AmqpReceiverOptions receiverOptions) Creates a receiver used to consumer messages from the given address.rxCreateSender(String address) Creates a sender used to send messages to the given address.rxCreateSender(String address, AmqpSenderOptions options) Creates a sender used to send messages to the given address.toString()io.vertx.proton.ProtonConnectionunwrap()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
AmqpConnection
-
AmqpConnection
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
exceptionHandler
Registers a handler called on disconnection.- Parameters:
handler- the exception handler.- Returns:
- the connection
-
close
-
rxClose
Closes the AMQP connection, i.e. allows the Close frame to be emitted.- Returns:
- a future notified when the connection is closed
-
createReceiver
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.- Parameters:
address- The source address to attach the consumer to, must not benull- Returns:
- a future notified with the receiver. The receiver has been opened.
-
rxCreateReceiver
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.- Parameters:
address- The source address to attach the consumer to, must not benull- Returns:
- a future notified with the receiver. The receiver has been opened.
-
createReceiver
Creates a receiver used to consumer messages from the given address.- Parameters:
address- The source address to attach the consumer to.receiverOptions- The options for this receiver.- Returns:
- a future notified with the receiver, once opened. Note that the
messageHandlercan be called before thecompletionHandlerif messages are awaiting delivery.
-
rxCreateReceiver
Creates a receiver used to consumer messages from the given address.- Parameters:
address- The source address to attach the consumer to.receiverOptions- The options for this receiver.- Returns:
- a future notified with the receiver, once opened. Note that the
messageHandlercan be called before thecompletionHandlerif messages are awaiting delivery.
-
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.- Returns:
- a future notified when the receiver has been created and opened.
-
rxCreateDynamicReceiver
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.- Returns:
- a future notified when the receiver has been created and opened.
-
createSender
Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, checkcreateAnonymousSender().- Parameters:
address- The target address to attach to, must not benull- Returns:
- a future notified with the sender, once opened
-
rxCreateSender
Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, checkcreateAnonymousSender().- Parameters:
address- The target address to attach to, must not benull- Returns:
- a future notified with the sender, once opened
-
createSender
Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, checkcreateAnonymousSender().- Parameters:
address- The target address to attach to, allowed to benullif theoptionsconfigures the sender to be attached to a dynamic address (provided by the broker).options- The AMQP sender options- Returns:
- a future notified with the sender, once opened
-
rxCreateSender
Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, checkcreateAnonymousSender().- Parameters:
address- The target address to attach to, allowed to benullif theoptionsconfigures the sender to be attached to a dynamic address (provided by the broker).options- The AMQP sender options- Returns:
- a future notified with the sender, once opened
-
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.
- Returns:
- a future notifid with the created sender, once opened
-
rxCreateAnonymousSender
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.
- Returns:
- a future notifid with the created sender, once opened
-
isDisconnected
public boolean isDisconnected()- Returns:
- whether the connection has been disconnected.
-
closeFuture
-
rxCloseFuture
- Returns:
- a future completed when the connection is closed
-
unwrap
public io.vertx.proton.ProtonConnection unwrap()- Returns:
- the underlying ProtonConnection.
-
newInstance
-