public interface FutureCallback<V>
Future
computation asynchronously.
To attach to a ListenableFuture
use Futures.addCallback(com.google.common.util.concurrent.ListenableFuture<V>, com.google.common.util.concurrent.FutureCallback<? super V>)
.
void onSuccess(V result)
Future
computation when it is
successful.void onFailure(Throwable t)
Future
computation fails or is canceled.
If the future's get
method throws an ExecutionException
, then the cause is passed to this method. Any other
thrown object is passed unaltered.
Copyright © 2010-2013. All Rights Reserved.