T
- Type of result returnedpublic class FutureCallbackResultHandler<T> extends AbstractFutureCallbackResultHandler<T>
FutureCallback
where failures are ignored and the result is
delegated to a lambda provided at construction.
See AbstractFutureCallbackResultHandler
for a similar implementation except using an
abstract class rather than accepting a lambda.
Constructor and Description |
---|
FutureCallbackResultHandler(java.util.function.Consumer<T> resultHandler)
Construct a new result handler with the provided consumer that results will be provided to.
|
Modifier and Type | Method and Description |
---|---|
void |
handleResult(T result)
Called once a result was produced successfully.
|
handleFailure
public FutureCallbackResultHandler(java.util.function.Consumer<T> resultHandler)
resultHandler
- Consumer for results to accept results as callback is invoked.public void handleResult(T result)
FutureCallback
result
- Result that was provided from the future.