Class List Method List File List

# Class: VertxUnit::TestCompletion

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

## Instance Method Summary (collapse)

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

## Constructor Details

### - (`TestCompletion`) initialize(j_del)

Returns a new instance of TestCompletion

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

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

## Instance Method Details

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

Raises:

- (`ArgumentError`)

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

    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`)

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

    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

### - (`Boolean`) completed?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

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

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

### - (`Boolean`) failed?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

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

    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`)

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

    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

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

    def j_del
      @j_del
    end

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

Raises:

- (`ArgumentError`)

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

    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`)

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

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