spring-framework / org.springframework.core.task.support

Package org.springframework.core.task.support

Types

ConcurrentExecutorAdapter

open class ConcurrentExecutorAdapter : Executor

Adapter that exposes the java.util.concurrent.Executor interface for any Spring org.springframework.core.task.TaskExecutor.

This is less useful as of Spring 3.0, since TaskExecutor itself extends the Executor interface. The adapter is only relevant for hiding the TaskExecutor nature of a given object now, solely exposing the standard Executor interface to a client.

ExecutorServiceAdapter

open class ExecutorServiceAdapter : AbstractExecutorService

Adapter that takes a Spring org.springframework.core.task.TaskExecutor) and exposes a full java.util.concurrent.ExecutorService for it.

This is primarily for adapting to client components that communicate via the java.util.concurrent.ExecutorService API. It can also be used as common ground between a local Spring TaskExecutor backend and a JNDI-located ManagedExecutorService in a Java EE 6 environment.

NOTE: This ExecutorService adapter does not support the lifecycle methods in the java.util.concurrent.ExecutorService API ("shutdown()" etc), similar to a server-wide ManagedExecutorService in a Java EE 6 environment. The lifecycle is always up to the backend pool, with this adapter acting as an access-only proxy for that target pool.