public class

ExecutorServiceAdapter

extends AbstractExecutorService
java.lang.Object
   ↳ java.util.concurrent.AbstractExecutorService
     ↳ org.springframework.core.task.support.ExecutorServiceAdapter

Class Overview

Adapter that takes a Spring 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.

See Also

Summary

Public Constructors
ExecutorServiceAdapter(TaskExecutor taskExecutor)
Create a new ExecutorServiceAdapter, using the given target executor.
Public Methods
boolean awaitTermination(long timeout, TimeUnit unit)
void execute(Runnable task)
boolean isShutdown()
boolean isTerminated()
void shutdown()
List<Runnable> shutdownNow()
[Expand]
Inherited Methods
From class java.util.concurrent.AbstractExecutorService
From class java.lang.Object
From interface java.util.concurrent.Executor
From interface java.util.concurrent.ExecutorService

Public Constructors

public ExecutorServiceAdapter (TaskExecutor taskExecutor)

Also: SpringCore

Create a new ExecutorServiceAdapter, using the given target executor.

Public Methods

public boolean awaitTermination (long timeout, TimeUnit unit)

Also: SpringCore

public void execute (Runnable task)

Also: SpringCore

public boolean isShutdown ()

Also: SpringCore

public boolean isTerminated ()

Also: SpringCore

public void shutdown ()

Also: SpringCore

public List<Runnable> shutdownNow ()

Also: SpringCore