Adapter that takes a JDK 1.5 java.util.concurrent.Executor and
exposes a Spring
org.springframework.core.task.TaskExecutor for it.
NOTE: This class implements Spring's
org.springframework.core.task.TaskExecutor interface as well as the JDK 1.5
java.util.concurrent.Executor interface, with the former being the primary
interface, the other just serving as secondary convenience. For this reason, the
exception handling follows the TaskExecutor contract rather than the Executor contract,
in particular regarding the
org.springframework.core.task.TaskRejectedException .
Note that there is a pre-built
ThreadPoolTaskExecutor that allows for
defining a JDK 1.5
java.util.concurrent.ThreadPoolExecutor in bean style,
exposing it as a Spring
org.springframework.core.task.TaskExecutor directly.
This is a convenient alternative to a raw ThreadPoolExecutor definition with
a separate definition of the present adapter class.
author: Juergen Hoeller since: 2.0 See Also: java.util.concurrent.Executor See Also: java.util.concurrent.ThreadPoolExecutor See Also: java.util.concurrent.Executors See Also: ThreadPoolTaskExecutor |