Class List Method List File List

# Class: VertxMysqlPostgresql::AsyncSQLClient

Inherits:
  Object
  - Object
  - VertxMysqlPostgresql::AsyncSQLClient
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mysql-postgresql/async_sql_client.rb

## Direct Known Subclasses

MySQLClient, PostgreSQLClient

## Instance Method Summary (collapse)

- - (Object) close
- - (Object) get_connection
- - (AsyncSQLClient) initialize(j_del) constructor
  A new instance of AsyncSQLClient.
- - (Object) j_del

## Constructor Details

### - (`AsyncSQLClient`) initialize(j_del)

Returns a new instance of AsyncSQLClient

    9
    10
    11
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mysql-postgresql/async_sql_client.rb', line 9

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) close

Raises:

- (`ArgumentError`)

    21
    22
    23
    24
    25
    26
    27
    28
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mysql-postgresql/async_sql_client.rb', line 21

    def close
      if !block_given?
        return @j_del.java_method(:close, []).call()
      elsif block_given?
        return @j_del.java_method(:close, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling close()"
    end

### - (`Object`) get_connection

Raises:

- (`ArgumentError`)

    33
    34
    35
    36
    37
    38
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mysql-postgresql/async_sql_client.rb', line 33

    def get_connection
      if block_given?
        return @j_del.java_method(:getConnection, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxSql::SQLConnection) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling get_connection()"
    end

### - (`Object`) j_del

    14
    15
    16
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mysql-postgresql/async_sql_client.rb', line 14

    def j_del
      @j_del
    end