public interface Future<T> extends Callback<T>
| Modifier and Type | Method and Description |
|---|---|
Object |
getError() |
T |
getResult() |
<OUT> Future<OUT> |
map(Filter<T,OUT> filter) |
Future<T> |
onError(java.util.function.Consumer errorHandler)
called when an error is set as the result
|
Future<T> |
onResult(java.util.function.Consumer<T> resultHandler)
called when a valid result of a future becomes available
|
Future<T> |
onTimeout(java.util.function.Consumer timeoutHandler)
called when the async call times out. see 'timeOutIn'
|
void |
signal()
same as receive(null,null)
|
Future<T> |
then(Callback<T> result)
called when any result of a future becomes available
|
Future<T> |
then(Runnable result)
called when any result of a future becomes available
|
Future |
timeoutIn(long millis) |
Future<T> then(Runnable result)
result - Future<T> then(Callback<T> result)
result - Future<T> onResult(java.util.function.Consumer<T> resultHandler)
Future<T> onError(java.util.function.Consumer errorHandler)
Future<T> onTimeout(java.util.function.Consumer timeoutHandler)
timeoutHandler - T getResult()
Object getError()
void signal()
Future timeoutIn(long millis)
millis - Copyright © 2015. All rights reserved.