Package io.vertx.reactivex.amqp

## Class AmqpConnection

- java.lang.Object
- - io.vertx.reactivex.amqp.AmqpConnection

- All Implemented Interfaces:
    `io.vertx.lang.rx.RxDelegate`

      public class AmqpConnection
      extends Object
      implements io.vertx.lang.rx.RxDelegate

  Once connected to the broker or router, you get a connection. This connection is automatically opened.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static io.vertx.lang.rx.TypeArg<AmqpConnection>` | `__TYPE_ARG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AmqpConnection​(AmqpConnection delegate)` |
    `AmqpConnection​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Future<Void>` | `close()` | Closes the AMQP connection, i.e. allows the Close frame to be emitted.
    `Future<Void>` | `closeFuture()` |
    `Future<AmqpSender>` | `createAnonymousSender()` | Creates an anonymous sender.
    `Future<AmqpReceiver>` | `createDynamicReceiver()` | Creates a dynamic receiver.
    `Future<AmqpReceiver>` | `createReceiver​(String address)` | Creates a receiver used to consume messages from the given address.
    `Future<AmqpReceiver>` | `createReceiver​(String address, AmqpReceiverOptions receiverOptions)` | Creates a receiver used to consumer messages from the given address.
    `Future<AmqpSender>` | `createSender​(String address)` | Creates a sender used to send messages to the given address.
    `Future<AmqpSender>` | `createSender​(String address, AmqpSenderOptions options)` | Creates a sender used to send messages to the given address.
    `boolean` | `equals​(Object o)` |
    `AmqpConnection` | `exceptionHandler​(Handler<Throwable> handler)` | Registers a handler called on disconnection.
    `AmqpConnection` | `getDelegate()` |
    `int` | `hashCode()` |
    `boolean` | `isDisconnected()` |
    `static AmqpConnection` | `newInstance​(AmqpConnection arg)` |
    `Completable` | `rxClose()` | Closes the AMQP connection, i.e. allows the Close frame to be emitted.
    `Completable` | `rxCloseFuture()` |
    `Single<AmqpSender>` | `rxCreateAnonymousSender()` | Creates an anonymous sender.
    `Single<AmqpReceiver>` | `rxCreateDynamicReceiver()` | Creates a dynamic receiver.
    `Single<AmqpReceiver>` | `rxCreateReceiver​(String address)` | Creates a receiver used to consume messages from the given address.
    `Single<AmqpReceiver>` | `rxCreateReceiver​(String address, AmqpReceiverOptions receiverOptions)` | Creates a receiver used to consumer messages from the given address.
    `Single<AmqpSender>` | `rxCreateSender​(String address)` | Creates a sender used to send messages to the given address.
    `Single<AmqpSender>` | `rxCreateSender​(String address, AmqpSenderOptions options)` | Creates a sender used to send messages to the given address.
    `String` | `toString()` |
    `io.vertx.proton.ProtonConnection` | `unwrap()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<AmqpConnection> __TYPE_ARG

  - ### Constructor Detail

    - #### AmqpConnection

          public AmqpConnection​(AmqpConnection delegate)

    - #### AmqpConnection

          public AmqpConnection​(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public AmqpConnection getDelegate()

      Specified by:
        `getDelegate` in interface `io.vertx.lang.rx.RxDelegate`

    - #### exceptionHandler

          public AmqpConnection exceptionHandler​(Handler<Throwable> handler)

      Registers a handler called on disconnection.
      Parameters:
        `handler` - the exception handler.
      Returns:
        the connection

    - #### close

          public Future<Void> close()

      Closes the AMQP connection, i.e. allows the Close frame to be emitted.
      Returns:
        a future notified when the connection is closed

    - #### rxClose

          public Completable rxClose()

      Closes the AMQP connection, i.e. allows the Close frame to be emitted.
      Returns:
        a future notified when the connection is closed

    - #### createReceiver

          public Future<AmqpReceiver> 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.
      Parameters:
        `address` - The source address to attach the consumer to, must not be `null`
      Returns:
        a future notified with the receiver. The receiver has been opened.

    - #### rxCreateReceiver

          public 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.
      Parameters:
        `address` - The source address to attach the consumer to, must not be `null`
      Returns:
        a future notified with the receiver. The receiver has been opened.

    - #### createReceiver

          public Future<AmqpReceiver> createReceiver​(String address,
                                                     AmqpReceiverOptions receiverOptions)

      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 `messageHandler` can be called before the `completionHandler` if messages are awaiting delivery.

    - #### rxCreateReceiver

          public Single<AmqpReceiver> rxCreateReceiver​(String address,
                                                       AmqpReceiverOptions receiverOptions)

      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 `messageHandler` can be called before the `completionHandler` if messages are awaiting delivery.

    - #### createDynamicReceiver

          public Future<AmqpReceiver> createDynamicReceiver()

      Creates a dynamic receiver. The address is provided by the broker and is available in the `completionHandler`, using the `AmqpReceiver.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

          public Single<AmqpReceiver> rxCreateDynamicReceiver()

      Creates a dynamic receiver. The address is provided by the broker and is available in the `completionHandler`, using the `AmqpReceiver.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

          public Future<AmqpSender> createSender​(String address)

      Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, check `createAnonymousSender()`.
      Parameters:
        `address` - The target address to attach to, must not be `null`
      Returns:
        a future notified with the sender, once opened

    - #### rxCreateSender

          public Single<AmqpSender> rxCreateSender​(String address)

      Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, check `createAnonymousSender()`.
      Parameters:
        `address` - The target address to attach to, must not be `null`
      Returns:
        a future notified with the sender, once opened

    - #### createSender

          public Future<AmqpSender> createSender​(String address,
                                                 AmqpSenderOptions options)

      Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, check `createAnonymousSender()`.
      Parameters:
        `address` - 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 options
      Returns:
        a future notified with the sender, once opened

    - #### rxCreateSender

          public Single<AmqpSender> rxCreateSender​(String address,
                                                   AmqpSenderOptions options)

      Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, check `createAnonymousSender()`.
      Parameters:
        `address` - 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 options
      Returns:
        a future notified with the sender, once opened

    - #### createAnonymousSender

          public Future<AmqpSender> 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

          public Single<AmqpSender> 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

          public Future<Void> closeFuture()

      Returns:
        a future completed when the connection is closed

    - #### rxCloseFuture

          public Completable rxCloseFuture()

      Returns:
        a future completed when the connection is closed

    - #### unwrap

          public io.vertx.proton.ProtonConnection unwrap()

      Returns:
        the underlying ProtonConnection.

    - #### newInstance

          public static AmqpConnection newInstance​(AmqpConnection arg)