Class List Method List File List

# Class: VertxUnit::Async

Inherits:
  Completion
  - Object
  - Completion
  - VertxUnit::Async
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb

## Instance Method Summary (collapse)

- - (Object) await(timeoutMillis = nil)
- - (Object) await_success(timeoutMillis = nil)
- - (Object) complete
- - (Boolean) completed?
- - (Object) count
- - (Object) count_down
- - (Boolean) failed?
- - (Object) handler
- - (Async) initialize(j_del) constructor
  A new instance of Async.
- - (Object) j_del
- - (Object) resolve(future = nil)
- - (Boolean) succeeded?

## Constructor Details

### - (`Async`) initialize(j_del)

Returns a new instance of Async

    10
    11
    12
    13
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 10

    def initialize(j_del)
      super(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) await(timeoutMillis = nil)

Raises:

- (`ArgumentError`)

    63
    64
    65
    66
    67
    68
    69
    70
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 63

    def await(timeoutMillis=nil)
      if !block_given? && timeoutMillis == nil
        return @j_del.java_method(:await, []).call()
      elsif timeoutMillis.class == Fixnum && !block_given?
        return @j_del.java_method(:await, [Java::long.java_class]).call(timeoutMillis)
      end
      raise ArgumentError, "Invalid arguments when calling await(timeoutMillis)"
    end

### - (`Object`) await_success(timeoutMillis = nil)

Raises:

- (`ArgumentError`)

    76
    77
    78
    79
    80
    81
    82
    83
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 76

    def await_success(timeoutMillis=nil)
      if !block_given? && timeoutMillis == nil
        return @j_del.java_method(:awaitSuccess, []).call()
      elsif timeoutMillis.class == Fixnum && !block_given?
        return @j_del.java_method(:awaitSuccess, [Java::long.java_class]).call(timeoutMillis)
      end
      raise ArgumentError, "Invalid arguments when calling await_success(timeoutMillis)"
    end

### - (`Object`) complete

Raises:

- (`ArgumentError`)

    102
    103
    104
    105
    106
    107
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 102

    def complete
      if !block_given?
        return @j_del.java_method(:complete, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling complete()"
    end

### - (`Boolean`) completed?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    29
    30
    31
    32
    33
    34
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 29

    def completed?
      if !block_given?
        return @j_del.java_method(:isCompleted, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling completed?()"
    end

### - (`Object`) count

Raises:

- (`ArgumentError`)

    85
    86
    87
    88
    89
    90
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 85

    def count
      if !block_given?
        return @j_del.java_method(:count, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling count()"
    end

### - (`Object`) count_down

Raises:

- (`ArgumentError`)

    93
    94
    95
    96
    97
    98
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 93

    def count_down
      if !block_given?
        return @j_del.java_method(:countDown, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling count_down()"
    end

### - (`Boolean`) failed?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    43
    44
    45
    46
    47
    48
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 43

    def failed?
      if !block_given?
        return @j_del.java_method(:isFailed, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling failed?()"
    end

### - (`Object`) handler

Raises:

- (`ArgumentError`)

    52
    53
    54
    55
    56
    57
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 52

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

### - (`Object`) j_del

    16
    17
    18
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 16

    def j_del
      @j_del
    end

### - (`Object`) resolve(future = nil)

Raises:

- (`ArgumentError`)

    22
    23
    24
    25
    26
    27
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 22

    def resolve(future=nil)
      if future.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:resolve, [Java::IoVertxCore::Future.java_class]).call(future.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling resolve(future)"
    end

### - (`Boolean`) succeeded?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    36
    37
    38
    39
    40
    41
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-unit/async.rb', line 36

    def succeeded?
      if !block_given?
        return @j_del.java_method(:isSucceeded, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling succeeded?()"
    end