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 |
|---|---|
AmqpConnection |
close(Handler<AsyncResult<Void>> done)
Closes the AMQP connection, i.e.
|
AmqpConnection |
createAnonymousSender(Handler<AsyncResult<AmqpSender>> completionHandler)
Creates an anonymous sender.
|
AmqpConnection |
createDynamicReceiver(Handler<AsyncResult<AmqpReceiver>> completionHandler)
Creates a dynamic receiver.
|
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.
|
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.
|
AmqpClientOptions |
options() |
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 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 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 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 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 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 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 AmqpClientOptions options()
Copyright © 2020. All rights reserved.