The Spring Framework

org.springframework.core.task
Interface TaskExecutor

All Known Subinterfaces:
SchedulingTaskExecutor
All Known Implementing Classes:
ConcurrentTaskExecutor, SimpleAsyncTaskExecutor, SimpleThreadPoolTaskExecutor, SyncTaskExecutor, ThreadPoolTaskExecutor, TimerTaskExecutor, WorkManagerTaskExecutor

public interface TaskExecutor

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, etc.

Identical to JDK 1.5's java.util.concurrent.Executor interface. Separate mainly for compatibility with JDK 1.3+. Implementations can simply implement the JDK 1.5 Executor interface as well, as it defines the exact same method signature.

Since:
2.0
Author:
Juergen Hoeller
See Also:
Executor

Method Summary
 void execute(Runnable task)
          Execute the given task.
 

Method Detail

execute

void execute(Runnable task)
Execute the given task.

The call might return immediately if the executor uses an asynchronous execution strategy, or might block in case synchronous execution.

Parameters:
task - the Runnable to execute
See Also:
Executor.execute(Runnable)

The Spring Framework

Copyright © 2002-2006 The Spring Framework.