public interface AsyncListenableTaskExecutor extends AsyncTaskExecutor
AsyncTaskExecutor interface, adding the capability to submit
tasks for ListenableFutures.ListenableFutureTIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE| Modifier and Type | Method and Description |
|---|---|
<T> ListenableFuture<T> |
submitListenable(java.util.concurrent.Callable<T> task)
Submit a
Callable task for execution, receiving a ListenableFuture
representing that task. |
ListenableFuture<?> |
submitListenable(java.lang.Runnable task)
Submit a
Runnable task for execution, receiving a ListenableFuture
representing that task. |
execute, submit, submitexecuteListenableFuture<?> submitListenable(java.lang.Runnable task)
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)ListenableFuture representing pending completion of the taskTaskRejectedException - if the given task was not accepted<T> ListenableFuture<T> submitListenable(java.util.concurrent.Callable<T> task)
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)ListenableFuture representing pending completion of the taskTaskRejectedException - if the given task was not accepted