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 |
---|---|
java.util.concurrent.Future<T> |
future() |
void |
onComplete(T value,
java.lang.Throwable error) |
void |
watch(PromiseCallback<T> callback) |
public java.util.concurrent.Future<T> future()
public void watch(PromiseCallback<T> callback)
public void onComplete(T value, java.lang.Throwable error)
onComplete
in class PromiseCallback<T>
Copyright © 2005-2014 Red Hat, Inc.. All Rights Reserved.