The ExecutorService Interface
Home ] Up ] The Executor Interface ] [ The ExecutorService Interface ] ScheduledExecutorService ] The Executors Class ] Example ]

 

 

The ExecutorService interface, a sub-interface of Executor, supplements execute with a similar, but more versatile submit method. Like execute, submit accepts Runnable objects, but also accepts Callable objects, which allow the task to return a value. The submit method returns a Future object, which is used to retrieve the Callable return value and to manage the status of both Callable and Runnable tasks.

ExecutorService also provides methods for submitting large collections of Callable objects. Finally, ExecutorService provides a number of methods for managing the shutdown of the executor.

Details of ExecutorService may be found here.

 
The page was last updated February 19, 2008