- Type Parameters:
V- the returned value type, if anyE- the exception propagated, if any
- All Superinterfaces:
Callable<V>
- All Known Implementing Classes:
RetryTask
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface TaskCallback<V extends @Nullable Object, E extends Exception>
extends Callable<V>
Variant of
Callable with a flexible exception signature
that can be adapted in the SyncTaskExecutor.execute(TaskCallback)
method signature for propagating specific exception types only.
An implementation of this interface can also be passed into any
Callback-based method such as AsyncTaskExecutor.submit(Callable)
or AsyncTaskExecutor.submitCompletable(Callable). It is just capable
of adapting to flexible exception propagation in caller signatures as well.
- Since:
- 7.0
- Author:
- Juergen Hoeller
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncall()static TaskCallback<@Nullable Void, RuntimeException> Derive aTaskCallbackfrom the givenRunnable.static <V> TaskCallback<V, Exception> Derive aTaskCallbackfrom the givenCallable.
-
Method Details
-
call
-
from
Derive aTaskCallbackfrom the givenCallable.- Since:
- 7.0.4
-
from
Derive aTaskCallbackfrom the givenRunnable.- Since:
- 7.0.4
-