站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

TaskExecutor (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.core.task
Interface TaskExecutor

All Known Subinterfaces:
AsyncTaskExecutor, SchedulingTaskExecutor
All Known Implementing Classes:
ConcurrentTaskExecutor, ConcurrentTaskExecutor, SimpleAsyncTaskExecutor, SimpleThreadPoolTaskExecutor, SyncTaskExecutor, ThreadPoolTaskExecutor, ThreadPoolTaskExecutor, TimerTaskExecutor, WorkManagerTaskExecutor, 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, and more.

Equivalent to JDK 1.5's 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 implementation uses an asynchronous execution strategy, or might block in the case of synchronous execution.

Parameters:
task - the Runnable to execute (never null)
Throws:
TaskRejectedException - if the given task was not accepted

The Spring Framework

Copyright © 2002-2007 The Spring Framework.