Class DB2Connection

All Implemented Interfaces:
MutinyDelegate

public class DB2Connection extends SqlConnection implements MutinyDelegate
A connection to DB2 server.

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

  • Field Details

  • Constructor Details

    • DB2Connection

      public DB2Connection(io.vertx.db2client.DB2Connection delegate)
    • DB2Connection

      public DB2Connection(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.db2client.DB2Connection getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Overrides:
      getDelegate in class SqlConnection
      Returns:
      the delegate used by this Mutiny object of generated type
    • 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
    • connect

      @CheckReturnValue public static io.smallrye.mutiny.Uni<DB2Connection> connect(Vertx vertx, io.vertx.db2client.DB2ConnectOptions connectOptions)
      Create a connection to DB2 server with the given connectOptions.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      vertx - the vertx instance
      connectOptions - the options for the connection
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • connectAndAwait

      public static DB2Connection connectAndAwait(Vertx vertx, io.vertx.db2client.DB2ConnectOptions connectOptions)
      Blocking variant of connect(io.vertx.mutiny.core.Vertx,DB2ConnectOptions).

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Parameters:
      vertx - the vertx instance
      connectOptions - the options for the connection
      Returns:
      the DB2Connection instance produced by the operation.
    • connectAndForget

      public static void connectAndForget(Vertx vertx, io.vertx.db2client.DB2ConnectOptions connectOptions)
      Variant of connect(io.vertx.mutiny.core.Vertx,DB2ConnectOptions) that ignores the result of the operation.

      This method subscribes on the result of connect(io.vertx.mutiny.core.Vertx,DB2ConnectOptions), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from connect(io.vertx.mutiny.core.Vertx,DB2ConnectOptions) but you don't need to compose it with other operations.

      Parameters:
      vertx - the vertx instance
      connectOptions - the options for the connection
    • connect

      @CheckReturnValue public static io.smallrye.mutiny.Uni<DB2Connection> connect(Vertx vertx, String connectionUri)
      Like connect(io.vertx.mutiny.core.Vertx, io.vertx.db2client.DB2ConnectOptions) with options build from connectionUri.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      vertx -
      connectionUri -
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • connectAndAwait

      public static DB2Connection connectAndAwait(Vertx vertx, String connectionUri)
      Blocking variant of connect(io.vertx.mutiny.core.Vertx,String).

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Parameters:
      vertx -
      connectionUri -
      Returns:
      the DB2Connection instance produced by the operation.
    • connectAndForget

      public static void connectAndForget(Vertx vertx, String connectionUri)
      Variant of connect(io.vertx.mutiny.core.Vertx,String) that ignores the result of the operation.

      This method subscribes on the result of connect(io.vertx.mutiny.core.Vertx,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from connect(io.vertx.mutiny.core.Vertx,String) but you don't need to compose it with other operations.

      Parameters:
      vertx -
      connectionUri -
    • prepare

      @CheckReturnValue public io.smallrye.mutiny.Uni<PreparedStatement> prepare(String sql)
      Description copied from class: SqlConnection
      Create a prepared statement using the given sql string.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Overrides:
      prepare in class SqlConnection
      Parameters:
      sql - the sql
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • prepareAndAwait

      public PreparedStatement prepareAndAwait(String sql)
      Description copied from class: SqlConnection
      Blocking variant of SqlConnection.prepare(String).

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Overrides:
      prepareAndAwait in class SqlConnection
      Parameters:
      sql - the sql
      Returns:
      the PreparedStatement instance produced by the operation.
    • prepareAndForget

      public DB2Connection prepareAndForget(String sql)
      Description copied from class: SqlConnection
      Variant of SqlConnection.prepare(String) that ignores the result of the operation.

      This method subscribes on the result of SqlConnection.prepare(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from SqlConnection.prepare(String) but you don't need to compose it with other operations.

      Overrides:
      prepareAndForget in class SqlConnection
      Parameters:
      sql - the sql
      Returns:
      the instance of SqlConnection to chain method calls.
    • exceptionHandler

      public DB2Connection exceptionHandler(Consumer<Throwable> handler)
      Overrides:
      exceptionHandler in class SqlConnection
      Parameters:
      handler - the handler
      Returns:
    • closeHandler

      public DB2Connection closeHandler(Runnable handler)
      Overrides:
      closeHandler in class SqlConnection
      Parameters:
      handler - the handler
      Returns:
    • ping

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> ping()
      Send a PING command to check if the server is alive.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • pingAndAwait

      public Void pingAndAwait()
      Blocking variant of ping().

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Returns:
      the Void instance produced by the operation.
    • pingAndForget

      public DB2Connection pingAndForget()
      Variant of ping() that ignores the result of the operation.

      This method subscribes on the result of ping(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from ping() but you don't need to compose it with other operations.

      Returns:
      the instance of DB2Connection to chain method calls.
    • debug

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> debug()
      Send a DEBUG command to dump debug information to the server's stdout.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • debugAndAwait

      public Void debugAndAwait()
      Blocking variant of debug().

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Returns:
      the Void instance produced by the operation.
    • debugAndForget

      public DB2Connection debugAndForget()
      Variant of debug() that ignores the result of the operation.

      This method subscribes on the result of debug(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from debug() but you don't need to compose it with other operations.

      Returns:
      the instance of DB2Connection to chain method calls.
    • cast

      public static DB2Connection cast(SqlConnection sqlConnection)
      Parameters:
      sqlConnection - the connection to cast
      Returns:
      a instance
    • newInstance

      public static DB2Connection newInstance(io.vertx.db2client.DB2Connection arg)