org.springframework.core.task.TaskExecutor |
Known Indirect Subclasses
AsyncTaskExecutor,
ConcurrentTaskExecutor,
ConcurrentTaskScheduler,
GlassFishWorkManagerTaskExecutor,
JBossWorkManagerTaskExecutor,
SchedulingTaskExecutor,
SimpleAsyncTaskExecutor,
SimpleThreadPoolTaskExecutor,
SyncTaskExecutor,
TaskExecutorAdapter,
ThreadPoolTaskExecutor,
ThreadPoolTaskScheduler,
TimerTaskExecutor,
WorkManagerTaskExecutor
AsyncTaskExecutor |
Extended interface for asynchronous TaskExecutor implementations,
offering an overloaded execute(Runnable, long) variant with a start
timeout parameter as well support for java.util.concurrent.Callable. |
ConcurrentTaskExecutor |
Adapter that takes a JSR-166 backport
edu.emory.mathcs.backport.java.util.concurrent.Executor and
exposes a Spring TaskExecutor for it. |
ConcurrentTaskScheduler |
Adapter that takes a JDK 1.5 java.util.concurrent.ScheduledExecutorService
and exposes a Spring TaskScheduler for it. |
GlassFishWorkManagerTaskExecutor |
Spring TaskExecutor adapter for the GlassFish JCA WorkManager. |
JBossWorkManagerTaskExecutor |
Spring TaskExecutor adapter for the JBoss JCA WorkManager. |
SchedulingTaskExecutor |
A TaskExecutor extension exposing
scheduling characteristics that are relevant to potential task submitters. |
SimpleAsyncTaskExecutor |
TaskExecutor implementation that fires up a new Thread for each task,
executing it asynchronously. |
SimpleThreadPoolTaskExecutor |
Subclass of Quartz's SimpleThreadPool that implements Spring's
TaskExecutor interface
and listens to Spring lifecycle callbacks. |
SyncTaskExecutor |
TaskExecutor implementation that executes each task synchronously
in the calling thread. |
TaskExecutorAdapter |
Adapter that takes a JDK 1.5 java.util.concurrent.Executor and
exposes a Spring TaskExecutor for it. |
ThreadPoolTaskExecutor |
JavaBean that allows for configuring a JSR-166 backport
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor in bean
style (through its "corePoolSize", "maxPoolSize", "keepAliveSeconds", "queueCapacity"
properties), exposing it as a Spring TaskExecutor . |
ThreadPoolTaskScheduler |
Implementation of Spring's TaskScheduler interface, wrapping
a native java.util.concurrent.ScheduledThreadPoolExecutor. |
TimerTaskExecutor |
This class is deprecated.
as of Spring 3.0, in favor of the scheduling.concurrent
package which is based on Java 5's java.util.concurrent.ExecutorService
|
WorkManagerTaskExecutor |
TaskExecutor implementation that delegates to a CommonJ WorkManager,
implementing the commonj.work.WorkManager interface,
which either needs to be specified as reference or through the JNDI name. |
|
Class Overview
Simple task executor interface that abstracts the execution
of a Runnable.
Implementations can use all sorts of different execution strategies,
such as: synchronous, asynchronous, using a thread pool, and more.
Equivalent to JDK 1.5's Executor
interface; extending it now in Spring 3.0, so that clients may declare
a dependency on an Executor and receive any TaskExecutor implementation.
This interface remains separate from the standard Executor interface
mainly for backwards compatibility with JDK 1.4 in Spring 2.x.
Summary
Public Methods |
abstract
void
|
execute(Runnable task)
Execute the given task .
|
Public Methods
public
abstract
void
execute
(Runnable task)
Execute the given task
.
The call might return immediately if the implementation uses
an asynchronous execution strategy, or might block in the case
of synchronous execution.
Parameters
task
| the Runnable to execute (never null ) |