public class AmqpConnectionImpl extends Object implements AmqpConnection
| Modifier and Type | Field and Description |
|---|---|
static String |
PRODUCT |
static org.apache.qpid.proton.amqp.Symbol |
PRODUCT_KEY |
| Modifier and Type | Method and Description |
|---|---|
Future<Void> |
close()
Like
AmqpConnection.close(Handler) but returns a Future of the asynchronous result |
AmqpConnection |
close(Handler<AsyncResult<Void>> done)
Closes the AMQP connection, i.e.
|
Future<AmqpSender> |
createAnonymousSender()
Like
AmqpConnection.createAnonymousSender(Handler) but returns a Future of the asynchronous result |
AmqpConnection |
createAnonymousSender(Handler<AsyncResult<AmqpSender>> completionHandler)
Creates an anonymous sender.
|
Future<AmqpReceiver> |
createDynamicReceiver()
Like
AmqpConnection.createDynamicReceiver(Handler) but returns a Future of the asynchronous result |
AmqpConnection |
createDynamicReceiver(Handler<AsyncResult<AmqpReceiver>> completionHandler)
Creates a dynamic receiver.
|
Future<AmqpReceiver> |
createReceiver(String address)
Like
AmqpConnection.createReceiver(String, Handler) but returns a Future of the asynchronous result |
Future<AmqpReceiver> |
createReceiver(String address,
AmqpReceiverOptions receiverOptions)
Like
AmqpConnection.createReceiver(String, AmqpReceiverOptions, Handler) but returns a Future of the asynchronous result |
AmqpConnection |
createReceiver(String address,
AmqpReceiverOptions receiverOptions,
Handler<AsyncResult<AmqpReceiver>> completionHandler)
Creates a receiver used to consumer messages from the given address.
|
AmqpConnection |
createReceiver(String address,
Handler<AsyncResult<AmqpReceiver>> completionHandler)
Creates a receiver used to consume messages from the given address.
|
Future<AmqpSender> |
createSender(String address)
Like
AmqpConnection.createSender(String, Handler) but returns a Future of the asynchronous result |
Future<AmqpSender> |
createSender(String address,
AmqpSenderOptions options)
Like
AmqpConnection.createSender(String, AmqpSenderOptions, Handler) but returns a Future of the asynchronous result |
AmqpConnection |
createSender(String address,
AmqpSenderOptions options,
Handler<AsyncResult<AmqpSender>> completionHandler)
Creates a sender used to send messages to the given address.
|
AmqpConnection |
createSender(String address,
Handler<AsyncResult<AmqpSender>> completionHandler)
Creates a sender used to send messages to the given address.
|
AmqpConnection |
exceptionHandler(Handler<Throwable> handler)
Registers a handler called on disconnection.
|
boolean |
isDisconnected() |
AmqpClientOptions |
options() |
ProtonConnection |
unwrap()
Allows retrieving the underlying
ProtonConnection. |
public static final String PRODUCT
public static final org.apache.qpid.proton.amqp.Symbol PRODUCT_KEY
public AmqpConnection exceptionHandler(Handler<Throwable> handler)
AmqpConnectionexceptionHandler in interface AmqpConnectionhandler - the exception handler.public AmqpConnection close(Handler<AsyncResult<Void>> done)
AmqpConnectionclose in interface AmqpConnectiondone - the close handler notified when the connection is closed. May be null.public Future<Void> close()
AmqpConnectionAmqpConnection.close(Handler) but returns a Future of the asynchronous resultclose in interface AmqpConnectionpublic AmqpConnection createDynamicReceiver(Handler<AsyncResult<AmqpReceiver>> completionHandler)
AmqpConnectioncompletionHandler,
using the AmqpReceiver.address() method. this method is useful for request-reply to generate a unique
reply address.createDynamicReceiver in interface AmqpConnectioncompletionHandler - the completion handler, called when the receiver has been created and opened.public Future<AmqpReceiver> createDynamicReceiver()
AmqpConnectionAmqpConnection.createDynamicReceiver(Handler) but returns a Future of the asynchronous resultcreateDynamicReceiver in interface AmqpConnectionpublic AmqpConnection createReceiver(String address, Handler<AsyncResult<AmqpReceiver>> completionHandler)
AmqpConnectioncreateReceiver in interface AmqpConnectionaddress - The source address to attach the consumer to, must not be nullcompletionHandler - the handler called with the receiver. The receiver has been opened.public Future<AmqpReceiver> createReceiver(String address)
AmqpConnectionAmqpConnection.createReceiver(String, Handler) but returns a Future of the asynchronous resultcreateReceiver in interface AmqpConnectionpublic AmqpConnection createReceiver(String address, AmqpReceiverOptions receiverOptions, Handler<AsyncResult<AmqpReceiver>> completionHandler)
AmqpConnectioncreateReceiver in interface AmqpConnectionaddress - 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.public Future<AmqpReceiver> createReceiver(String address, AmqpReceiverOptions receiverOptions)
AmqpConnectionAmqpConnection.createReceiver(String, AmqpReceiverOptions, Handler) but returns a Future of the asynchronous resultcreateReceiver in interface AmqpConnectionpublic AmqpConnection createSender(String address, Handler<AsyncResult<AmqpSender>> completionHandler)
AmqpConnectionAmqpConnection.createAnonymousSender(Handler).createSender in interface AmqpConnectionaddress - The target address to attach to, must not be nullcompletionHandler - The handler called with the sender, once openedAmqpConnection.createAnonymousSender(Handler)public Future<AmqpSender> createSender(String address)
AmqpConnectionAmqpConnection.createSender(String, Handler) but returns a Future of the asynchronous resultcreateSender in interface AmqpConnectionpublic AmqpConnection createSender(String address, AmqpSenderOptions options, Handler<AsyncResult<AmqpSender>> completionHandler)
AmqpConnectionAmqpConnection.createAnonymousSender(Handler).createSender in interface AmqpConnectionaddress - The target address to attach to, allowed to be null if the options
configures the sender to be attached to a dynamic address (provided by the broker).options - The AMQP sender optionscompletionHandler - The handler called with the sender, once openedAmqpConnection.createAnonymousSender(Handler)public Future<AmqpSender> createSender(String address, AmqpSenderOptions options)
AmqpConnectionAmqpConnection.createSender(String, AmqpSenderOptions, Handler) but returns a Future of the asynchronous resultcreateSender in interface AmqpConnectionpublic AmqpConnection createAnonymousSender(Handler<AsyncResult<AmqpSender>> completionHandler)
AmqpConnectionUnlike "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.
createAnonymousSender in interface AmqpConnectioncompletionHandler - The handler called with the created sender, once openedpublic Future<AmqpSender> createAnonymousSender()
AmqpConnectionAmqpConnection.createAnonymousSender(Handler) but returns a Future of the asynchronous resultcreateAnonymousSender in interface AmqpConnectionpublic boolean isDisconnected()
isDisconnected in interface AmqpConnectionpublic ProtonConnection unwrap()
ProtonConnection.public AmqpClientOptions options()
Copyright © 2021. All rights reserved.