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 (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.
    `Object` | `getDelegate()`
    `void` | `handler(Handler<AsyncResult<T>> completionHandler)` Completion handler to receive a completion signal when this completions completes.
    `boolean` | `isCompleted()` @return Returns: true if this completion is completed
    `boolean` | `isFailed()` @return Returns: true if the this completion is completed and failed
    `boolean` | `isSucceeded()` @return Returns: 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 Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### Completion(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

    - #### Object getDelegate()

    - #### void handler(Handler<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