@Deprecated public class FutureCallbackFailureHandler extends AbstractFutureCallbackFailureHandler
FutureCallbackwhere the result is ignored and failures are delegated to a lambda provided at construction. This can allow you to easily do an action only on a failure condition.
AbstractFutureCallbackFailureHandler for a similar implementation except using an
abstract class rather than accepting a lambda.
|Constructor and Description|
Construct a new failure handler with the provided consumer that failures will be provided to.
|Modifier and Type||Method and Description|
Called once a future has completed, but completed with either a failure or a cancellation.
public FutureCallbackFailureHandler(java.util.function.Consumer<java.lang.Throwable> failureHandler)
failureHandler- Handler to be invoked as callback is invoked with failures
public void handleFailure(java.lang.Throwable t)
If the future was canceled then a CancellationException will be provided.
t- Throwable representing the future failure.