org.springframework.scheduling.annotation

## 类 AnnotationAsyncExecutionInterceptor

- java.lang.Object
- - org.springframework.aop.interceptor.AsyncExecutionAspectSupport
  - - org.springframework.aop.interceptor.AsyncExecutionInterceptor
    - - org.springframework.scheduling.annotation.AnnotationAsyncExecutionInterceptor

- 所有已实现的接口:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.core.Ordered

      public class AnnotationAsyncExecutionInterceptor
      extends org.springframework.aop.interceptor.AsyncExecutionInterceptor

  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.1.2. Supports detecting qualifier metadata via `@Async` at the method or declaring class level. See `getExecutorQualifier(Method)` for details.
  从以下版本开始:
    3.1.2
  作者:
    Chris Beams, Stephane Nicoll
  另请参阅:
    `Async`, `AsyncAnnotationAdvisor`

- - ### 字段概要

    - ### 从类继承的字段 org.springframework.aop.interceptor.AsyncExecutionAspectSupport

      `DEFAULT_TASK_EXECUTOR_BEAN_NAME, logger`

    - ### 从接口继承的字段 org.springframework.core.Ordered

      `HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

  - ### 构造器概要

    构造器
    构造器和说明
    `AnnotationAsyncExecutionInterceptor(Executor defaultExecutor)` Create a new `AnnotationAsyncExecutionInterceptor` with the given executor and a simple `AsyncUncaughtExceptionHandler`.
    `AnnotationAsyncExecutionInterceptor(Executor defaultExecutor, org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler exceptionHandler)` Create a new `AnnotationAsyncExecutionInterceptor` with the given executor.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected String` | `getExecutorQualifier(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.

    - ### 从类继承的方法 org.springframework.aop.interceptor.AsyncExecutionInterceptor

      `getDefaultExecutor, getOrder, invoke`

    - ### 从类继承的方法 org.springframework.aop.interceptor.AsyncExecutionAspectSupport

      `determineAsyncExecutor, doSubmit, findQualifiedExecutor, handleError, setBeanFactory, setExceptionHandler, setExecutor`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### AnnotationAsyncExecutionInterceptor

          public AnnotationAsyncExecutionInterceptor(@Nullable
                                                     Executor defaultExecutor)

      Create a new `AnnotationAsyncExecutionInterceptor` with the given executor and a simple `AsyncUncaughtExceptionHandler`.
      参数:
        `defaultExecutor` - the executor to be used by default if no more specific executor has been qualified at the method level using `Async.value()`; as of 4.2.6, a local executor for this interceptor will be built otherwise

    - #### AnnotationAsyncExecutionInterceptor

          public AnnotationAsyncExecutionInterceptor(@Nullable
                                                     Executor defaultExecutor,
                                                     org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler exceptionHandler)

      Create a new `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()`; as of 4.2.6, a local executor for this interceptor will be built otherwise
        `exceptionHandler` - the `AsyncUncaughtExceptionHandler` to use to handle exceptions thrown by asynchronous method executions with `void` return type

  - ### 方法详细资料

    - #### getExecutorQualifier

          @Nullable
          protected String getExecutorQualifier(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. 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` 在类中 `org.springframework.aop.interceptor.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
      另请参阅:
        `AsyncExecutionAspectSupport.determineAsyncExecutor(Method)`