| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.aop.interceptor.AsyncExecutionInterceptor
public class AsyncExecutionInterceptor
AOP Alliance MethodInterceptor that processes method invocations
 asynchronously, using a given AsyncTaskExecutor.
 Typically used with the org.springframework.context.task.Async annotation.
 
In terms of target method signatures, any parameter types are supported.
 However, the return type is constrained to either void or
 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
 (like Spring's AsyncResult
 or EJB 3.1's javax.ejb.AsyncResult).
Async, 
AsyncAnnotationAdvisor| Field Summary | 
|---|
| Fields inherited from interface org.springframework.core.Ordered | 
|---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE | 
| Constructor Summary | |
|---|---|
AsyncExecutionInterceptor(AsyncTaskExecutor asyncExecutor)
Create a new AsyncExecutionInterceptor.  | 
|
AsyncExecutionInterceptor(Executor asyncExecutor)
Create a new AsyncExecutionInterceptor.  | 
|
| Method Summary | |
|---|---|
 int | 
getOrder()
Return the order value of this object, with a higher value meaning greater in terms of sorting.  | 
 Object | 
invoke(MethodInvocation invocation)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public AsyncExecutionInterceptor(AsyncTaskExecutor asyncExecutor)
asyncExecutor - the Spring AsyncTaskExecutor to delegate topublic AsyncExecutionInterceptor(Executor asyncExecutor)
asyncExecutor - the java.util.concurrent Executor
 to delegate to (typically a ExecutorService| Method Detail | 
|---|
public Object invoke(MethodInvocation invocation)
              throws Throwable
invoke in interface MethodInterceptorThrowablepublic int getOrder()
OrderedNormally starting with 0, with Integer.MAX_VALUE
 indicating the greatest value. Same order values will result
 in arbitrary positions for the affected objects.
 
Higher values can be interpreted as lower priority. As a consequence, the object with the lowest value has highest priority (somewhat analogous to Servlet "load-on-startup" values).
getOrder in interface Ordered
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||