org.springframework.core.task

Interface AsyncListenableTaskExecutor

    • Method Detail

      • submitListenable

        ListenableFuture<?> submitListenable(java.lang.Runnable task)
        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

        <T> ListenableFuture<T> submitListenable(java.util.concurrent.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.
        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