vertx / io.vertx.ext.unit / Completion

Completion

interface Completion<T : Any>

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

Author
Julien Viet

Functions

await

abstract fun await(): Unit

Cause the current thread to wait until this completion completes. If the current thread is interrupted, an exception will be thrown.

abstract fun await(timeoutMillis: Long): Unit

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.

awaitSuccess

abstract fun awaitSuccess(): Unit

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.

abstract fun awaitSuccess(timeoutMillis: Long): Unit

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.

handler

abstract fun handler(completionHandler: Handler<AsyncResult<T>>): Unit

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

isCompleted

abstract fun isCompleted(): Boolean

isFailed

abstract fun isFailed(): Boolean

isSucceeded

abstract fun isSucceeded(): Boolean

resolve

abstract fun resolve(future: Future<T>): Unit

Completes the future upon completion, otherwise fails it.

Inheritors

Async

interface Async : Completion<Void>

An asynchronous exit point for a test.

TestCompletion

interface TestCompletion : Completion<Void>

This object provides callback-ability for the end of a test suite, the completion succeeds when all tests pass otherwise it fails.