public class Future<T> extends Object
NOTE: This class has been automatically generated from the
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Method and Description |
---|---|
void |
complete()
Set a null result.
|
void |
complete(T result)
Set the result.
|
void |
fail(String failureMessage)
Set the failure.
|
static <T> Future<T> |
failedFuture(String failureMessage)
Create a failed future with the specified failure message.
|
static <T> Future<T> |
future()
Create a future that hasn't completed yet
|
Object |
getDelegate() |
boolean |
isComplete()
Has the future completed?
|
static <T> Future<T> |
newInstance(Future arg) |
void |
setHandler(Handler<AsyncResult<T>> handler)
Set a handler for the result.
|
rx.Observable<T> |
setHandlerObservable()
Set a handler for the result.
|
static <T> Future<T> |
succeededFuture()
Create a succeeded future with a null result
|
static <T> Future<T> |
succeededFuture(T result)
Created a succeeded future with the specified result.
|
public Future(Future delegate)
public Object getDelegate()
public static <T> Future<T> future()
public static <T> Future<T> succeededFuture()
public static <T> Future<T> succeededFuture(T result)
result
- the resultpublic static <T> Future<T> failedFuture(String failureMessage)
failureMessage
- the failure messagepublic boolean isComplete()
It's completed if it's either succeeded or failed.
public void setHandler(Handler<AsyncResult<T>> handler)
If the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed.
handler
- the Handler that will be called with the resultpublic rx.Observable<T> setHandlerObservable()
If the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed.
public void complete(T result)
result
- the resultpublic void complete()
public void fail(String failureMessage)
failureMessage
- the failure messageCopyright © 2015. All Rights Reserved.