Interface FutureCallback<V extends @Nullable java.lang.Object>
- 
 @GwtCompatible public interface FutureCallback<V extends @Nullable java.lang.Object> A callback for accepting the results of aFuturecomputation asynchronously.To attach to a ListenableFutureuseFutures.addCallback(com.google.common.util.concurrent.ListenableFuture<V>, com.google.common.util.concurrent.FutureCallback<? super V>, java.util.concurrent.Executor).- Since:
- 10.0
- Author:
- Anthony Zana
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonFailure(java.lang.Throwable t)Invoked when aFuturecomputation fails or is canceled.voidonSuccess(V result)Invoked with the result of theFuturecomputation when it is successful.
 
- 
- 
- 
Method Detail- 
onSuccessvoid onSuccess(V result) Invoked with the result of theFuturecomputation when it is successful.
 - 
onFailurevoid onFailure(java.lang.Throwable t) Invoked when aFuturecomputation fails or is canceled.If the future's getmethod throws anExecutionException, then the cause is passed to this method. Any other thrown object is passed unaltered.
 
- 
 
-