Package org.springframework.core.task

# Interface AsyncListenableTaskExecutor

All Superinterfaces:
  `AsyncTaskExecutor`, `Executor`, `TaskExecutor`

All Known Implementing Classes:
  `SimpleAsyncTaskExecutor`, `TaskExecutorAdapter`

@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.
as of 6.0, in favor of `AsyncTaskExecutor.submitCompletable(Runnable)` and `AsyncTaskExecutor.submitCompletable(Callable)`
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 Type
Method
Description
`ListenableFuture<?>`
`submitListenable(Runnable task)`
Deprecated, for removal: This API element is subject to removal in a future version.
in favor of `AsyncTaskExecutor.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 of `AsyncTaskExecutor.submitCompletable(Callable)`

### Methods inherited from interface org.springframework.core.task.AsyncTaskExecutor

`execute, submit, submit, submitCompletable, submitCompletable`

### Methods inherited from interface org.springframework.core.task.TaskExecutor

`execute`

## Method Details

### submitListenable

@Deprecated(since="6.0", forRemoval=true) ListenableFuture<?> submitListenable(Runnable task)
Deprecated, for removal: This API element is subject to removal in a future version.
in favor of `AsyncTaskExecutor.submitCompletable(Runnable)`
Submit a `Runnable` task for execution, receiving a `ListenableFuture` representing that task. The Future will return a `null` result upon completion.

Parameters:
  `task` - the `Runnable` to execute (never `null`)
Returns:
  a `ListenableFuture` representing 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 of `AsyncTaskExecutor.submitCompletable(Callable)`
Submit a `Callable` task for execution, receiving a `ListenableFuture` representing that task. The Future will return the Callable's result upon completion.

Parameters:
  `task` - the `Callable` to execute (never `null`)
Returns:
  a `ListenableFuture` representing pending completion of the task
Throws:
  `TaskRejectedException` - if the given task was not accepted