public class Promise<T> extends PromiseCallback<T>
Used to implement callback based result passing of a promised computation. Can be converted to a future using the future() method.
Constructor and Description |
---|
Promise() |
Modifier and Type | Method and Description |
---|---|
Future<T> |
future() |
void |
onComplete(T value,
Throwable error) |
void |
watch(PromiseCallback<T> callback) |
public Promise()
public void watch(PromiseCallback<T> callback)
public void onComplete(T value, Throwable error)
onComplete
in class PromiseCallback<T>
Copyright © 2005–2017 The Apache Software Foundation. All rights reserved.