org.springframework.core.task

## 接口 AsyncListenableTaskExecutor

- 所有超级接口:
    AsyncTaskExecutor, Executor, TaskExecutor
  所有已知实现类:
    SimpleAsyncTaskExecutor, TaskExecutorAdapter

      public interface AsyncListenableTaskExecutor
      extends AsyncTaskExecutor

  Extension of the `AsyncTaskExecutor` interface, adding the capability to submit tasks for `ListenableFuture`s.
  从以下版本开始:
    4.0
  作者:
    Arjen Poutsma
  另请参阅:
    `ListenableFuture`

- - ### 字段概要

    - ### 从接口继承的字段 org.springframework.core.task.AsyncTaskExecutor

      `TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE`

  - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `<T> ListenableFuture<T>` | `submitListenable(Callable<T> task)` Submit a `Callable` task for execution, receiving a `ListenableFuture` representing that task.
    `ListenableFuture<?>` | `submitListenable(Runnable task)` Submit a `Runnable` task for execution, receiving a `ListenableFuture` representing that task.

    - ### 从接口继承的方法 org.springframework.core.task.AsyncTaskExecutor

      `execute, submit, submit`

    - ### 从接口继承的方法 org.springframework.core.task.TaskExecutor

      `execute`

- - ### 方法详细资料

    - #### submitListenable

          ListenableFuture<?> submitListenable(Runnable task)

      Submit a `Runnable` task for execution, receiving a `ListenableFuture` representing that task. The Future will return a `null` result upon completion.
      参数:
        `task` - the `Runnable` to execute (never `null`)
      返回:
        a `ListenableFuture` representing pending completion of the task
      抛出:
        `TaskRejectedException` - if the given task was not accepted

    - #### submitListenable

          <T> ListenableFuture<T> submitListenable(Callable<T> task)

      Submit a `Callable` task for execution, receiving a `ListenableFuture` representing that task. The Future will return the Callable's result upon completion.
      参数:
        `task` - the `Callable` to execute (never `null`)
      返回:
        a `ListenableFuture` representing pending completion of the task
      抛出:
        `TaskRejectedException` - if the given task was not accepted