Package: io.vertx.groovy.ext.unit

## [Groovy] Class Completion<T>

- io.vertx.groovy.ext.unit.Completion

- A completion object that emits completion notifications either succeeded or failed.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `Completion (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `await()` Cause the current thread to wait until thi completion completes.
    `void` | `await(long timeoutMillis)` Cause the current thread to wait until this completion completes with a configurable timeout.
    `void` | `awaitSuccess()` Cause the current thread to wait until this completion completes and succeeds.
    `void` | `awaitSuccess(long timeoutMillis)` Cause the current thread to wait until this completion completes and succeeds with a configurable timeout.
    `java.lang.Object` | `getDelegate()`
    `void` | `handler(io.vertx.core.Handler<io.vertx.core.AsyncResult<T>> completionHandler)` Completion handler to receive a completion signal when this completions completes.
    `boolean` | `isCompleted()` @return true if this completion is completed
    `boolean` | `isFailed()` @return true if the this completion is completed and failed
    `boolean` | `isSucceeded()` @return true if the this completion is completed succeeded
    `void` | `resolve(Future<T> future)` Completes the future upon completion, otherwise fails it.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### Completion(java.lang.Object delegate)

  - ### Method Detail

    - #### void await()

      Cause the current thread to wait until thi completion completes.

      If the current thread is interrupted, an exception will be thrown.

    - #### void await(long timeoutMillis)

      Cause the current thread to wait until this completion completes with a configurable timeout.

      If completion times out or the current thread is interrupted, an exception will be thrown.
      Parameters:
        `timeoutMillis` - the timeout in milliseconds

    - #### void awaitSuccess()

      Cause the current thread to wait until this completion completes and succeeds.

      If the current thread is interrupted or the suite fails, an exception will be thrown.

    - #### void awaitSuccess(long timeoutMillis)

      Cause the current thread to wait until this completion completes and succeeds with a configurable timeout.

      If completion times out or the current thread is interrupted or the suite fails, an exception will be thrown.
      Parameters:
        `timeoutMillis` - the timeout in milliseconds

    - #### java.lang.Object getDelegate()

    - #### void handler(io.vertx.core.Handler<io.vertx.core.AsyncResult<T>> completionHandler)

      Completion handler to receive a completion signal when this completions completes.

      Parameters:
        `completionHandler` - the completion handler

    - #### boolean isCompleted()

      Returns:
        true if this completion is completed

    - #### boolean isFailed()

      Returns:
        true if the this completion is completed and failed

    - #### boolean isSucceeded()

      Returns:
        true if the this completion is completed succeeded

    - #### void resolve(Future<T> future)

      Completes the future upon completion, otherwise fails it.

      Parameters:
        `future` - the future to resolve