Package: io.vertx.groovy.amqp.bridge

## [Groovy] Class AmqpBridge

- io.vertx.groovy.amqp.bridge.AmqpBridge

- Vert.x AMQP Bridge. Facilitates sending and receiving AMQP 1.0 messages.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `AmqpBridge (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Shuts the bridge down, closing the underlying connection.
    `static AmqpBridge` | `create(Vertx vertx)` Creates a Bridge.
    `static AmqpBridge` | `create(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options)` Creates a Bridge with the given options.
    `MessageConsumer<T>` | `createConsumer(java.lang.String amqpAddress)` Creates a consumer on the given AMQP address.
    `MessageProducer<T>` | `createProducer(java.lang.String amqpAddress)` Creates a producer to the given AMQP address.
    `java.lang.Object` | `getDelegate()`
    `void` | `start(java.lang.String hostname, int port, java.lang.String username, java.lang.String password, io.vertx.core.Handler<io.vertx.core.AsyncResult<AmqpBridge>> resultHandler)` Starts the bridge, establishing the underlying connection.
    `void` | `start(java.lang.String hostname, int port, io.vertx.core.Handler<io.vertx.core.AsyncResult<AmqpBridge>> resultHandler)` Starts the bridge, establishing the underlying connection.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### AmqpBridge(java.lang.Object delegate)

  - ### Method Detail

    - #### void close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Shuts the bridge down, closing the underlying connection.

      Parameters:
        `resultHandler` - the result handler

    - #### static AmqpBridge create(Vertx vertx)

      Creates a Bridge.

      Returns:
        the (not-yet-started) bridge.
      Parameters:
        `vertx` - the vertx instance to use

    - #### static AmqpBridge create(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options)

      Creates a Bridge with the given options.

      Returns:
        the (not-yet-started) bridge.
      Parameters:
        `vertx` - the vertx instance to use
        `options` - the options (see AmqpBridgeOptions)

    - #### MessageConsumer<T> createConsumer(java.lang.String amqpAddress)

      Creates a consumer on the given AMQP address. This method MUST be called from the bridge Context thread, as used in the result handler callback from the start methods. The bridge MUST be successfully started before the method is called.

      Returns:
        the consumer
      Parameters:
        `amqpAddress` - the address to consume from

    - #### MessageProducer<T> createProducer(java.lang.String amqpAddress)

      Creates a producer to the given AMQP address. This method MUST be called from the bridge Context thread, as used in the result handler callback from the start methods. The bridge MUST be successfully started before the method is called.

      Returns:
        the producer
      Parameters:
        `amqpAddress` - the address to produce to

    - #### java.lang.Object getDelegate()

    - #### void start(java.lang.String hostname, int port, java.lang.String username, java.lang.String password, io.vertx.core.Handler<io.vertx.core.AsyncResult<AmqpBridge>> resultHandler)

      Starts the bridge, establishing the underlying connection.

      Parameters:
        `hostname` - the host name to connect to
        `port` - the port to connect to
        `username` - the username
        `password` - the password
        `resultHandler` - the result handler

    - #### void start(java.lang.String hostname, int port, io.vertx.core.Handler<io.vertx.core.AsyncResult<AmqpBridge>> resultHandler)

      Starts the bridge, establishing the underlying connection.

      Parameters:
        `hostname` - the host name to connect to
        `port` - the port to connect to
        `resultHandler` - the result handler