public class AnnotationAsyncExecutionInterceptor extends AsyncExecutionInterceptor
Async
アノテーションに基づいてメソッドの実行を Executor
に委譲する AsyncExecutionInterceptor
の特殊化。Spring 3.1.2 で導入された Async.value()
エグゼキューター修飾メカニズムの使用をサポートするように特別に設計されています。メソッドまたはクラスレベルでの宣言で、@Async
を介した修飾子メタデータの検出をサポートします。詳細については、getExecutorQualifier(Method)
を参照してください。Async
, AsyncAnnotationAdvisor
DEFAULT_TASK_EXECUTOR_BEAN_NAME, logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターと説明 |
---|
AnnotationAsyncExecutionInterceptor(ExecutorSE defaultExecutor) 指定されたエグゼキューターと単純な AsyncUncaughtExceptionHandler で新しい AnnotationAsyncExecutionInterceptor を作成します。 |
AnnotationAsyncExecutionInterceptor(ExecutorSE defaultExecutor, AsyncUncaughtExceptionHandler exceptionHandler) 指定されたエグゼキューターで新しい AnnotationAsyncExecutionInterceptor を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
protected StringSE | getExecutorQualifier(MethodSE method) メソッドまたはクラスレベルで Async.value() を介して指定された、指定されたメソッドの実行時に使用されるエグゼキュータの修飾子または Bean 名を返します。 |
getDefaultExecutor, getOrder, invoke
configure, determineAsyncExecutor, doSubmit, findQualifiedExecutor, handleError, setBeanFactory, setExceptionHandler, setExecutor
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public AnnotationAsyncExecutionInterceptor(@Nullable ExecutorSE defaultExecutor)
AsyncUncaughtExceptionHandler
で新しい AnnotationAsyncExecutionInterceptor
を作成します。defaultExecutor
- Async.value()
を使用してメソッドレベルで特定のエグゼキューターが限定されていない場合にデフォルトで使用されるエグゼキューター。4.2.6 以降では、このインターセプターのローカルエグゼキューターが作成されます。public AnnotationAsyncExecutionInterceptor(@Nullable ExecutorSE defaultExecutor, AsyncUncaughtExceptionHandler exceptionHandler)
AnnotationAsyncExecutionInterceptor
を作成します。defaultExecutor
- Async.value()
を使用してメソッドレベルで特定のエグゼキューターが限定されていない場合にデフォルトで使用されるエグゼキューター。4.2.6 以降では、このインターセプターのローカルエグゼキューターが作成されます。exceptionHandler
- void
戻り値型の非同期メソッド実行によってスローされた例外を処理するために使用する AsyncUncaughtExceptionHandler
@Nullable protected StringSE getExecutorQualifier(MethodSE method)
Async.value()
を介して指定された、指定されたメソッドの実行時に使用されるエグゼキュータの修飾子または Bean 名を返します。@Async
がメソッドレベルとクラスレベルの両方で指定されている場合、メソッドの #value
が優先されます(空の文字列であっても、デフォルトのエグゼキューターを優先的に使用する必要があることを示します)。AsyncExecutionInterceptor
の getExecutorQualifier
method
- エグゼキューター修飾子メタデータをインスペクションするメソッド AsyncExecutionAspectSupport.determineAsyncExecutor(Method)