Interface DB2Connection

All Superinterfaces:
SqlClient, SqlConnection

public interface DB2Connection extends SqlConnection
A connection to DB2 server.
  • Method Details

    • connect

      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
    • connect

      static Future<DB2Connection> connect(Vertx vertx, String connectionUri)
      Like connect(Vertx, DB2ConnectOptions) with options build from connectionUri.
    • exceptionHandler

      DB2Connection exceptionHandler(Handler<Throwable> handler)
      Description copied from interface: SqlConnection
      Set an handler called with connection errors.
      Specified by:
      exceptionHandler in interface SqlConnection
      Parameters:
      handler - the handler
      Returns:
      a reference to this, so the API can be used fluently
    • closeHandler

      DB2Connection closeHandler(Handler<Void> handler)
      Description copied from interface: SqlConnection
      Set an handler called when the connection is closed.
      Specified by:
      closeHandler in interface SqlConnection
      Parameters:
      handler - the handler
      Returns:
      a reference to this, so the API can be used fluently
    • ping

      Future<Void> ping()
      Send a PING command to check if the server is alive.
      Returns:
      a future notified with the server response
    • debug

      Future<Void> debug()
      Send a DEBUG command to dump debug information to the server's stdout.
      Returns:
      a future notified with the execution result
    • cast

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