public class Completion<T> extends Object
original
non RX-ified interface using Vert.x codegen.Constructor and Description |
---|
Completion(Completion delegate) |
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
Object |
getDelegate() |
void |
handler(Handler<AsyncResult<T>> completionHandler)
Completion handler to receive a completion signal when this completions completes.
|
Observable<T> |
handlerObservable()
Completion handler to receive a completion signal when this completions completes.
|
boolean |
isCompleted() |
boolean |
isFailed() |
boolean |
isSucceeded() |
static <T> Completion |
newInstance(Completion arg) |
void |
resolve(Future<T> future)
Completes the future upon completion, otherwise fails it.
|
public Completion(Completion delegate)
public Object getDelegate()
public void resolve(Future<T> future)
future
- the future to resolvepublic boolean isCompleted()
public boolean isSucceeded()
public boolean isFailed()
public void handler(Handler<AsyncResult<T>> completionHandler)
completionHandler
- the completion handlerpublic Observable<T> handlerObservable()
public void await()
public void await(long timeoutMillis)
timeoutMillis
- the timeout in millisecondspublic void awaitSuccess()
public void awaitSuccess(long timeoutMillis)
timeoutMillis
- the timeout in millisecondspublic static <T> Completion newInstance(Completion arg)
Copyright © 2016. All rights reserved.