Interface TaskCallback<V extends @Nullable Object, E extends Exception>

Type Parameters:
V - the returned value type, if any
E - the exception propagated, if any
All Superinterfaces:
Callable<V>

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 Type
    Method
    Description