public interface Completion<T>
Modifier and Type | Method and Description |
---|---|
void |
await()
Cause the current thread to wait until this 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.
|
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.
|
void |
handler(Handler<AsyncResult<T>> completionHandler)
Completion handler to receive a completion signal when this completions completes.
|
boolean |
isCompleted() |
boolean |
isFailed() |
boolean |
isSucceeded() |
void |
resolve(Promise<T> future)
Completes the future upon completion, otherwise fails it.
|
void resolve(Promise<T> future)
future
- the future to resolveboolean isCompleted()
boolean isSucceeded()
boolean isFailed()
void handler(Handler<AsyncResult<T>> completionHandler)
completionHandler
- the completion handlervoid await()
void await(long timeoutMillis)
timeoutMillis
- the timeout in millisecondsvoid awaitSuccess()
void awaitSuccess(long timeoutMillis)
timeoutMillis
- the timeout in millisecondsCopyright © 2022 Eclipse. All rights reserved.