クラス AnnotationAsyncExecutionInterceptor
java.lang.ObjectSE
org.springframework.aop.interceptor.AsyncExecutionAspectSupport
org.springframework.aop.interceptor.AsyncExecutionInterceptor
org.springframework.scheduling.annotation.AnnotationAsyncExecutionInterceptor
- 実装されているすべてのインターフェース:
Advice、Interceptor、MethodInterceptor、Aware、BeanFactoryAware、Ordered
Async アノテーションに基づいて Executor にメソッド実行を委譲する AsyncExecutionInterceptor の特殊化。Async.value() エグゼキューター修飾子メカニズムの使用をサポートするように特別に設計されています。
メソッドまたは宣言クラスレベルでの @Async による修飾子メタデータの検出をサポートします。詳細については、getExecutorQualifier(Method) を参照してください。
- 導入:
- 3.1.2
- 作成者:
- Chris Beams, Stephane Nicoll
- 関連事項:
フィールドのサマリー
クラス org.springframework.aop.interceptor.AsyncExecutionAspectSupport から継承されたフィールド
DEFAULT_TASK_EXECUTOR_BEAN_NAME, loggerインターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEコンストラクターの概要
コンストラクターコンストラクター説明AnnotationAsyncExecutionInterceptor(ExecutorSE defaultExecutor) 指定されたエグゼキューターと単純なAsyncUncaughtExceptionHandlerで新しいAnnotationAsyncExecutionInterceptorを作成します。AnnotationAsyncExecutionInterceptor(ExecutorSE defaultExecutor, AsyncUncaughtExceptionHandler exceptionHandler) 指定されたエグゼキューターで新しいAnnotationAsyncExecutionInterceptorを作成します。メソッドのサマリー
修飾子と型メソッド説明protected StringSEgetExecutorQualifier(MethodSE method) メソッドまたはクラスレベルでAsync.value()を介して指定された、指定されたメソッドの実行時に使用されるエグゼキュータの修飾子または Bean 名を返します。クラス org.springframework.aop.interceptor.AsyncExecutionInterceptor から継承されたメソッド
getDefaultExecutor, getOrder, invokeクラス org.springframework.aop.interceptor.AsyncExecutionAspectSupport から継承されたメソッド
configure, determineAsyncExecutor, doSubmit, findQualifiedExecutor, handleError, setBeanFactory, setExceptionHandler, setExecutor
コンストラクターの詳細
AnnotationAsyncExecutionInterceptor
指定されたエグゼキューターと単純なAsyncUncaughtExceptionHandlerで新しいAnnotationAsyncExecutionInterceptorを作成します。- パラメーター:
defaultExecutor-Async.value()を使用してメソッドレベルで特定のエグゼキュータが修飾されていない場合、デフォルトで使用されるエグゼキュータ。それ以外の場合は、このインターセプターのローカルエグゼキューターがビルドされます
AnnotationAsyncExecutionInterceptor
public AnnotationAsyncExecutionInterceptor(@Nullable ExecutorSE defaultExecutor, AsyncUncaughtExceptionHandler exceptionHandler) 指定されたエグゼキューターで新しいAnnotationAsyncExecutionInterceptorを作成します。- パラメーター:
defaultExecutor-Async.value()を使用してメソッドレベルで特定のエグゼキュータが修飾されていない場合、デフォルトで使用されるエグゼキュータ。それ以外の場合は、このインターセプターのローカルエグゼキューターがビルドされますexceptionHandler-void戻り値型の非同期メソッド実行によってスローされた例外を処理するために使用するAsyncUncaughtExceptionHandler
メソッドの詳細
getExecutorQualifier
メソッドまたはクラスレベルでAsync.value()を介して指定された、指定されたメソッドの実行時に使用されるエグゼキュータの修飾子または Bean 名を返します。@Asyncがメソッドレベルとクラスレベルの両方で指定されている場合、メソッドのvalueが優先されます(空の文字列であっても、デフォルトのエグゼキューターを優先的に使用する必要があることを示します)。- オーバーライド:
- クラス
AsyncExecutionInterceptorのgetExecutorQualifier - パラメーター:
method- エグゼキューター修飾子メタデータをインスペクションするメソッド- 戻り値:
- 指定されている場合は修飾子、それ以外の場合はデフォルトのエグゼキュータを使用する必要があることを示す空の文字列
- 関連事項: