|
Spring Framework | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.aop.interceptor.AsyncExecutionAspectSupport
org.springframework.aop.interceptor.AsyncExecutionInterceptor
org.springframework.scheduling.annotation.AnnotationAsyncExecutionInterceptor
public class AnnotationAsyncExecutionInterceptor
Specialization of AsyncExecutionInterceptor
that delegates method execution to
an Executor
based on the Async
annotation. Specifically designed to
support use of Async.value()
executor qualification mechanism introduced in
Spring 3.2. Supports detecting qualifier metadata via @Async
at the method or
declaring class level. See getExecutorQualifier(Method)
for details.
Async
,
AsyncAnnotationAdvisor
Field Summary |
---|
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
AnnotationAsyncExecutionInterceptor(java.util.concurrent.Executor defaultExecutor)
Create a new AnnotationAsyncExecutionInterceptor with the given executor. |
Method Summary | |
---|---|
protected java.lang.String |
getExecutorQualifier(java.lang.reflect.Method method)
Return the qualifier or bean name of the executor to be used when executing the given method, specified via Async.value() at the method or declaring
class level. |
Methods inherited from class org.springframework.aop.interceptor.AsyncExecutionInterceptor |
---|
getOrder, invoke |
Methods inherited from class org.springframework.aop.interceptor.AsyncExecutionAspectSupport |
---|
determineAsyncExecutor, setBeanFactory, setExecutor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationAsyncExecutionInterceptor(java.util.concurrent.Executor defaultExecutor)
AnnotationAsyncExecutionInterceptor
with the given executor.
defaultExecutor
- the executor to be used by default if no more specific
executor has been qualified at the method level using Async.value()
.Method Detail |
---|
protected java.lang.String getExecutorQualifier(java.lang.reflect.Method method)
Async.value()
at the method or declaring
class level. If @Async
is specified at both the method and class level, the
method's #value
takes precedence (even if empty string, indicating that
the default executor should be used preferentially).
getExecutorQualifier
in class AsyncExecutionInterceptor
method
- the method to inspect for executor qualifier metadata
AsyncExecutionAspectSupport.determineAsyncExecutor(Method)
|
Spring Framework | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |