## 接口的使用
org.springframework.util.concurrent.ListenableFuture

- 使用ListenableFuture的程序包
  程序包 | 说明
  --- | ---
  org.springframework.core.task | This package defines Spring's core TaskExecutor abstraction, and provides SyncTaskExecutor and SimpleAsyncTaskExecutor implementations.
  org.springframework.core.task.support | Support classes for Spring's TaskExecutor abstraction.
  org.springframework.util.concurrent | Useful generic `java.util.concurrent.Future` extension.

- - ### org.springframework.core.task中ListenableFuture的使用

    返回ListenableFuture的org.springframework.core.task中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `<T> ListenableFuture<T>` | AsyncListenableTaskExecutor.`submitListenable(Callable<T> task)` Submit a `Callable` task for execution, receiving a `ListenableFuture` representing that task.
    `<T> ListenableFuture<T>` | SimpleAsyncTaskExecutor.`submitListenable(Callable<T> task)`
    `ListenableFuture<?>` | AsyncListenableTaskExecutor.`submitListenable(Runnable task)` Submit a `Runnable` task for execution, receiving a `ListenableFuture` representing that task.
    `ListenableFuture<?>` | SimpleAsyncTaskExecutor.`submitListenable(Runnable task)`

  - ### org.springframework.core.task.support中ListenableFuture的使用

    返回ListenableFuture的org.springframework.core.task.support中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `<T> ListenableFuture<T>` | TaskExecutorAdapter.`submitListenable(Callable<T> task)`
    `ListenableFuture<?>` | TaskExecutorAdapter.`submitListenable(Runnable task)`

  - ### org.springframework.util.concurrent中ListenableFuture的使用

    实现ListenableFuture的org.springframework.util.concurrent中的类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `CompletableToListenableFutureAdapter<T>` Adapts a `CompletableFuture` or `CompletionStage` into a Spring `ListenableFuture`.
    `class` | `ListenableFutureAdapter<T,S>` Abstract class that adapts a `ListenableFuture` parameterized over S into a `ListenableFuture` parameterized over T.
    `class` | `ListenableFutureTask<T>` Extension of `FutureTask` that implements `ListenableFuture`.
    `class` | `SettableListenableFuture<T>` A `ListenableFuture` whose value can be set via `SettableListenableFuture.set(Object)` or `SettableListenableFuture.setException(Throwable)`.

    参数类型为ListenableFuture的org.springframework.util.concurrent中的构造器
    构造器和说明
    `ListenableFutureAdapter(ListenableFuture<S> adaptee)` Construct a new `ListenableFutureAdapter` with the given adaptee.