T
- Type of result returnedpublic abstract class AbstractFutureCallbackResultHandler<T> extends java.lang.Object implements FutureCallback<T>
FutureCallback
where failures are ignored. This can
allow you to easily do an action only when a result is produced condition (with the result
provided by FutureCallback.handleResult(Object)
.
It is important to know that if a failure did occur, and your using this, unless your using some other means to detect it (like ListenableFuture#addListener(Runnable), you may never know the computation is complete.
For a simpler construction using a lambda look at FutureCallbackResultHandler
.
Constructor and Description |
---|
AbstractFutureCallbackResultHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handleFailure(java.lang.Throwable t)
Called once a future has completed, but completed with either a failure or a cancellation.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleResult
public void handleFailure(java.lang.Throwable t)
FutureCallback
If the future was canceled then a CancellationException will be provided.
handleFailure
in interface FutureCallback<T>
t
- Throwable representing the future failure.