public class ListenableFutureCallbackRegistry<T>
extends java.lang.Object
| 构造器和说明 |
|---|
ListenableFutureCallbackRegistry() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addCallback(ListenableFutureCallback<? super T> callback)
Adds the given callback to this registry.
|
void |
failure(java.lang.Throwable t)
Triggers a
ListenableFutureCallback.onFailure(Throwable) call on all added
callbacks with the given Throwable. |
void |
success(T result)
Triggers a
ListenableFutureCallback.onSuccess(Object) call on all added
callbacks with the given result |
public void addCallback(ListenableFutureCallback<? super T> callback)
callback - the callback to addpublic void success(T result)
ListenableFutureCallback.onSuccess(Object) call on all added
callbacks with the given resultresult - the result to trigger the callbacks withpublic void failure(java.lang.Throwable t)
ListenableFutureCallback.onFailure(Throwable) call on all added
callbacks with the given Throwable.t - the exception to trigger the callbacks with