public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport implements MethodInterceptor, org.springframework.core.Ordered
MethodInterceptorthat processes method invocations asynchronously, using a given
AsyncTaskExecutor. Typically used with the
In terms of target method signatures, any parameter types are supported.
However, the return type is constrained to either
java.util.concurrent.Future. In the latter case, the Future handle
returned from the proxy will be an actual asynchronous Future that can be used
to track the result of the asynchronous method execution. However, since the
target method needs to implement the same signature, it will have to return
a temporary Future handle that just passes the return value through
or EJB 3.1's
As of Spring 3.1.2 the
AnnotationAsyncExecutionInterceptor subclass is
preferred for use due to its support for executor qualification in conjunction with
|Constructor and Description|
Create a new
|Modifier and Type||Method and Description|
This implementation is a no-op for compatibility in Spring 3.1.2.
Intercept the given method invocation, submit the actual calling of the method to the correct task executor and return immediately to the caller.
determineAsyncExecutor, setBeanFactory, setExecutor
public Object invoke(MethodInvocation invocation) throws Throwable
method- the method to inspect for executor qualifier metadata
public int getOrder()