Package io.vertx.reactivex.db2client

## Class DB2Connection

- java.lang.Object
- - io.vertx.reactivex.sqlclient.SqlClient
  - - io.vertx.reactivex.sqlclient.SqlConnection
    - - io.vertx.reactivex.db2client.DB2Connection

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

      public class DB2Connection
      extends SqlConnection
      implements io.vertx.lang.rx.RxDelegate

  A connection to DB2 server.

  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<DB2Connection>` | `__TYPE_ARG` |

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static DB2Connection` | `cast​(SqlConnection sqlConnection)` | Cast a to `DB2Connection`.
    `DB2Connection` | `closeHandler​(Handler<Void> handler)` | Set an handler called when the connection is closed.
    `static Future<DB2Connection>` | `connect​(Vertx vertx, DB2ConnectOptions connectOptions)` | Create a connection to DB2 server with the given `connectOptions`.
    `static Future<DB2Connection>` | `connect​(Vertx vertx, String connectionUri)` | Like `connect(io.vertx.reactivex.core.Vertx, io.vertx.db2client.DB2ConnectOptions)` with options build from `connectionUri`.
    `Future<Void>` | `debug()` | Send a DEBUG command to dump debug information to the server's stdout.
    `boolean` | `equals​(Object o)` |
    `DB2Connection` | `exceptionHandler​(Handler<Throwable> handler)` | Set an handler called with connection errors.
    `DB2Connection` | `getDelegate()` |
    `int` | `hashCode()` |
    `static DB2Connection` | `newInstance​(DB2Connection arg)` |
    `Future<Void>` | `ping()` | Send a PING command to check if the server is alive.
    `static Single<DB2Connection>` | `rxConnect​(Vertx vertx, DB2ConnectOptions connectOptions)` | Create a connection to DB2 server with the given `connectOptions`.
    `static Single<DB2Connection>` | `rxConnect​(Vertx vertx, String connectionUri)` | Like `connect(io.vertx.reactivex.core.Vertx, io.vertx.db2client.DB2ConnectOptions)` with options build from `connectionUri`.
    `Completable` | `rxDebug()` | Send a DEBUG command to dump debug information to the server's stdout.
    `Completable` | `rxPing()` | Send a PING command to check if the server is alive.
    `String` | `toString()` |

    - ### Methods inherited from class io.vertx.reactivex.sqlclient.SqlConnection

      `begin, databaseMetadata, isSSL, newInstance, prepare, prepare, rxBegin, rxPrepare, rxPrepare, transaction`

    - ### Methods inherited from class io.vertx.reactivex.sqlclient.SqlClient

      `close, newInstance, preparedQuery, preparedQuery, query, rxClose`

    - ### 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<DB2Connection> __TYPE_ARG

  - ### Constructor Detail

    - #### DB2Connection

          public DB2Connection​(DB2Connection delegate)

    - #### DB2Connection

          public DB2Connection​(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `SqlConnection`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `SqlConnection`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `SqlConnection`

    - #### getDelegate

          public DB2Connection getDelegate()

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

    - #### connect

          public static Future<DB2Connection> connect​(Vertx vertx,
                                                      DB2ConnectOptions connectOptions)

      Create a connection to DB2 server with the given `connectOptions`.
      Parameters:
        `vertx` - the vertx instance
        `connectOptions` - the options for the connection
      Returns:
        a future notified with the connection or the failure

    - #### rxConnect

          public static Single<DB2Connection> rxConnect​(Vertx vertx,
                                                        DB2ConnectOptions connectOptions)

      Create a connection to DB2 server with the given `connectOptions`.
      Parameters:
        `vertx` - the vertx instance
        `connectOptions` - the options for the connection
      Returns:
        a future notified with the connection or the failure

    - #### connect

          public static Future<DB2Connection> connect​(Vertx vertx,
                                                      String connectionUri)

      Like `connect(io.vertx.reactivex.core.Vertx, io.vertx.db2client.DB2ConnectOptions)` with options build from `connectionUri`.
      Parameters:
        `vertx` -
        `connectionUri` -
      Returns:

    - #### rxConnect

          public static Single<DB2Connection> rxConnect​(Vertx vertx,
                                                        String connectionUri)

      Like `connect(io.vertx.reactivex.core.Vertx, io.vertx.db2client.DB2ConnectOptions)` with options build from `connectionUri`.
      Parameters:
        `vertx` -
        `connectionUri` -
      Returns:

    - #### exceptionHandler

          public DB2Connection exceptionHandler​(Handler<Throwable> handler)

      Description copied from class: `SqlConnection`
      Set an handler called with connection errors.
      Overrides:
        `exceptionHandler` in class `SqlConnection`
      Parameters:
        `handler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### closeHandler

          public DB2Connection closeHandler​(Handler<Void> handler)

      Description copied from class: `SqlConnection`
      Set an handler called when the connection is closed.
      Overrides:
        `closeHandler` in class `SqlConnection`
      Parameters:
        `handler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### ping

          public Future<Void> ping()

      Send a PING command to check if the server is alive.
      Returns:
        a future notified with the server response

    - #### rxPing

          public Completable rxPing()

      Send a PING command to check if the server is alive.
      Returns:
        a future notified with the server response

    - #### debug

          public Future<Void> debug()

      Send a DEBUG command to dump debug information to the server's stdout.
      Returns:
        a future notified with the execution result

    - #### rxDebug

          public Completable rxDebug()

      Send a DEBUG command to dump debug information to the server's stdout.
      Returns:
        a future notified with the execution result

    - #### cast

          public static DB2Connection cast​(SqlConnection sqlConnection)

      Cast a to `DB2Connection`. This is mostly useful for Vert.x generated APIs like RxJava/Mutiny.
      Parameters:
        `sqlConnection` - the connection to cast
      Returns:
        a `instance`

    - #### newInstance

          public static DB2Connection newInstance​(DB2Connection arg)