Package org.springframework.core.task
Interface AsyncListenableTaskExecutor
- All Superinterfaces:
AsyncTaskExecutor,Executor,TaskExecutor
- All Known Implementing Classes:
ConcurrentTaskExecutor,ConcurrentTaskScheduler,DefaultManagedTaskExecutor,DefaultManagedTaskScheduler,SimpleAsyncTaskExecutor,SimpleAsyncTaskScheduler,SimpleThreadPoolTaskExecutor,TaskExecutorAdapter,ThreadPoolTaskExecutor,ThreadPoolTaskScheduler
@Deprecated(since="6.0",
forRemoval=true)
public interface AsyncListenableTaskExecutor
extends AsyncTaskExecutor
Deprecated, for removal: This API element is subject to removal in a future version.
Extension of the
AsyncTaskExecutor interface, adding the capability to submit
tasks for ListenableFutures.- Since:
- 4.0
- Author:
- Arjen Poutsma
-
Field Summary
Fields inherited from interface org.springframework.core.task.AsyncTaskExecutor
TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE -
Method Summary
Modifier and TypeMethodDescriptionsubmitListenable(Runnable task) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofAsyncTaskExecutor.submitCompletable(Runnable)<T> ListenableFuture<T>submitListenable(Callable<T> task) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofAsyncTaskExecutor.submitCompletable(Callable)Methods inherited from interface org.springframework.core.task.AsyncTaskExecutor
execute, submit, submit, submitCompletable, submitCompletableMethods inherited from interface org.springframework.core.task.TaskExecutor
execute
-
Method Details
-
submitListenable
Deprecated, for removal: This API element is subject to removal in a future version.in favor ofAsyncTaskExecutor.submitCompletable(Runnable)Submit aRunnabletask for execution, receiving aListenableFuturerepresenting that task. The Future will return anullresult upon completion.- Parameters:
task- theRunnableto execute (nevernull)- Returns:
- a
ListenableFuturerepresenting pending completion of the task - Throws:
TaskRejectedException- if the given task was not accepted
-
submitListenable
@Deprecated(since="6.0", forRemoval=true) <T> ListenableFuture<T> submitListenable(Callable<T> task) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofAsyncTaskExecutor.submitCompletable(Callable)Submit aCallabletask for execution, receiving aListenableFuturerepresenting that task. The Future will return the Callable's result upon completion.- Parameters:
task- theCallableto execute (nevernull)- Returns:
- a
ListenableFuturerepresenting pending completion of the task - Throws:
TaskRejectedException- if the given task was not accepted
-
AsyncTaskExecutor.submitCompletable(Runnable)andAsyncTaskExecutor.submitCompletable(Callable)