Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.core.task
Interface TaskExecutor

All Superinterfaces:
  java.util.concurrent.Executor

All Known Subinterfaces:
  AsyncTaskExecutor, SchedulingTaskExecutor

All Known Implementing Classes:
  ConcurrentTaskExecutor, ConcurrentTaskExecutor, ConcurrentTaskScheduler, GlassFishWorkManagerTaskExecutor, JBossWorkManagerTaskExecutor, SimpleAsyncTaskExecutor, SimpleThreadPoolTaskExecutor, SyncTaskExecutor, TaskExecutorAdapter, ThreadPoolTaskExecutor, ThreadPoolTaskExecutor, ThreadPoolTaskScheduler, TimerTaskExecutor, WorkManagerTaskExecutor, WorkManagerTaskExecutor

    public interface TaskExecutor

extends java.util.concurrent.Executor

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.

Since:
  2.0
Author:
  Juergen Hoeller
See Also:
  `Executor`

Method Summary
`void` | `execute(java.lang.Runnable task)` Execute the given `task`.

Method Detail

### execute

    void execute(java.lang.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.

  Specified by:
    `execute` in interface `java.util.concurrent.Executor`
  Parameters:
    `task` - the `Runnable` to execute (never `null`)
  Throws:
    `TaskRejectedException` - if the given task was not accepted

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD