类 AnnotationAsyncExecutionInterceptor
java.lang.Object
cn.taketoday.aop.interceptor.AsyncExecutionAspectSupport
cn.taketoday.aop.interceptor.AsyncExecutionInterceptor
cn.taketoday.scheduling.annotation.AnnotationAsyncExecutionInterceptor
- 所有已实现的接口:
Aware,BeanFactoryAware,cn.taketoday.core.Ordered,Advice,Interceptor,MethodInterceptor
Specialization of
AsyncExecutionInterceptor that
delegates method execution to an Executor based
on the Async annotation. Supports detecting
qualifier metadata via @Async at the method or
declaring class level. See getExecutorQualifier(Method) for details.- 从以下版本开始:
- 4.0
- 作者:
- Chris Beams, Stephane Nicoll
- 另请参阅:
-
字段概要
从类继承的字段 cn.taketoday.aop.interceptor.AsyncExecutionAspectSupport
DEFAULT_TASK_EXECUTOR_BEAN_NAME从接口继承的字段 cn.taketoday.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器构造器说明AnnotationAsyncExecutionInterceptor(Executor defaultExecutor) Create a newAnnotationAsyncExecutionInterceptorwith the given executor and a simpleAsyncUncaughtExceptionHandler.AnnotationAsyncExecutionInterceptor(Executor defaultExecutor, AsyncUncaughtExceptionHandler exceptionHandler) Create a newAnnotationAsyncExecutionInterceptorwith the given executor. -
方法概要
修饰符和类型方法说明protected StringgetExecutorQualifier(Method method) Return the qualifier or bean name of the executor to be used when executing the given method, specified viaAsync.value()at the method or declaring class level.从类继承的方法 cn.taketoday.aop.interceptor.AsyncExecutionInterceptor
getDefaultExecutor, getOrder, invoke从类继承的方法 cn.taketoday.aop.interceptor.AsyncExecutionAspectSupport
configure, determineAsyncExecutor, doSubmit, findQualifiedExecutor, handleError, setBeanFactory, setExceptionHandler, setExecutor
-
构造器详细资料
-
AnnotationAsyncExecutionInterceptor
Create a newAnnotationAsyncExecutionInterceptorwith the given executor and a simpleAsyncUncaughtExceptionHandler.- 参数:
defaultExecutor- the executor to be used by default if no more specific executor has been qualified at the method level usingAsync.value(); Now a local executor for this interceptor will be built otherwise
-
AnnotationAsyncExecutionInterceptor
public AnnotationAsyncExecutionInterceptor(@Nullable Executor defaultExecutor, AsyncUncaughtExceptionHandler exceptionHandler) Create a newAnnotationAsyncExecutionInterceptorwith the given executor.- 参数:
defaultExecutor- the executor to be used by default if no more specific executor has been qualified at the method level usingAsync.value(); a local executor for this interceptor will be built otherwiseexceptionHandler- theAsyncUncaughtExceptionHandlerto use to handle exceptions thrown by asynchronous method executions withvoidreturn type
-
-
方法详细资料
-
getExecutorQualifier
Return the qualifier or bean name of the executor to be used when executing the given method, specified viaAsync.value()at the method or declaring class level. If@Asyncis specified at both the method and class level, the method's#valuetakes precedence (even if empty string, indicating that the default executor should be used preferentially).- 覆盖:
getExecutorQualifier在类中AsyncExecutionInterceptor- 参数:
method- the method to inspect for executor qualifier metadata- 返回:
- the qualifier if specified, otherwise empty string indicating that the default executor should be used
- 另请参阅:
-