接口 AsyncListenableTaskExecutor
- 所有超级接口:
AsyncTaskExecutor
,Executor
,TaskExecutor
- 所有已知实现类:
ConcurrentTaskExecutor
,ConcurrentTaskScheduler
,DefaultManagedTaskExecutor
,DefaultManagedTaskScheduler
,SimpleAsyncTaskExecutor
,SimpleThreadPoolTaskExecutor
,TaskExecutorAdapter
,ThreadPoolTaskExecutor
,ThreadPoolTaskScheduler
,WorkManagerTaskExecutor
,WorkManagerTaskExecutor
public interface AsyncListenableTaskExecutor extends AsyncTaskExecutor
Extension of theAsyncTaskExecutor
interface, adding the capability to submit tasks forListenableFutures
.- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma
- 另请参阅:
ListenableFuture
字段概要
从接口继承的字段 org.springframework.core.task.AsyncTaskExecutor
TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ListenableFuture<?>
submitListenable(Runnable task)
Submit aRunnable
task for execution, receiving aListenableFuture
representing that task.<T> ListenableFuture<T>
submitListenable(Callable<T> task)
Submit aCallable
task for execution, receiving aListenableFuture
representing that task.从接口继承的方法 org.springframework.core.task.AsyncTaskExecutor
execute, submit, submit
从接口继承的方法 org.springframework.core.task.TaskExecutor
execute
方法详细资料
submitListenable
ListenableFuture<?> submitListenable(Runnable task)
Submit aRunnable
task for execution, receiving aListenableFuture
representing that task. The Future will return anull
result upon completion.- 参数:
task
- theRunnable
to execute (nevernull
)- 返回:
- 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 aCallable
task for execution, receiving aListenableFuture
representing that task. The Future will return the Callable's result upon completion.- 参数:
task
- theCallable
to execute (nevernull
)- 返回:
- a
ListenableFuture
representing pending completion of the task - 抛出:
TaskRejectedException
- if the given task was not accepted