public class AsyncSupportConfigurer extends ObjectSE
コンストラクターと説明 |
---|
AsyncSupportConfigurer() |
修飾子と型 | メソッドと説明 |
---|---|
protected ListSE<CallableProcessingInterceptor> | getCallableInterceptors() |
protected ListSE<DeferredResultProcessingInterceptor> | getDeferredResultInterceptors() |
protected AsyncTaskExecutor | getTaskExecutor() |
protected LongSE | getTimeout() |
AsyncSupportConfigurer | registerCallableInterceptors(CallableProcessingInterceptor... interceptors) コントローラーが Callable SE を返すときに開始する同時リクエスト実行を中心としたコールバックを使用して、ライフサイクルインターセプターを構成します。 |
AsyncSupportConfigurer | registerDeferredResultInterceptors(DeferredResultProcessingInterceptor... interceptors) コントローラーが DeferredResult を返すときに開始する同時リクエスト実行を中心としたコールバックを使用して、ライフサイクルインターセプターを構成します。 |
AsyncSupportConfigurer | setDefaultTimeout(long timeout) 非同期リクエスト処理がタイムアウトするまでの時間をミリ秒単位で指定します。 |
AsyncSupportConfigurer | setTaskExecutor(AsyncTaskExecutor taskExecutor) 提供されたタスクエグゼキューターは、次の目的で使用されます。 Callable SE コントローラーメソッドの戻り値を処理します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public AsyncSupportConfigurer setTaskExecutor(AsyncTaskExecutor taskExecutor)
Callable
SE コントローラーメソッドの戻り値を処理します。 デフォルトでは、SimpleAsyncTaskExecutor
のみが使用されます。ただし、上記の 2 つのユースケースを使用する場合は、ThreadPoolTaskExecutor
などのスレッドプールによってバッキングされるエグゼキューターを構成することをお勧めします。
taskExecutor
- デフォルトで使用するタスクエグゼキューターインスタンス public AsyncSupportConfigurer setDefaultTimeout(long timeout)
この値が設定されていない場合、基礎となる実装のデフォルトのタイムアウトが使用されます。
timeout
- ミリ秒単位のタイムアウト値 public AsyncSupportConfigurer registerCallableInterceptors(CallableProcessingInterceptor... interceptors)
Callable
SE を返すときに開始する同時リクエスト実行を中心としたコールバックを使用して、ライフサイクルインターセプターを構成します。interceptors
- 登録するインターセプター public AsyncSupportConfigurer registerDeferredResultInterceptors(DeferredResultProcessingInterceptor... interceptors)
DeferredResult
を返すときに開始する同時リクエスト実行を中心としたコールバックを使用して、ライフサイクルインターセプターを構成します。interceptors
- 登録するインターセプター @Nullable protected AsyncTaskExecutor getTaskExecutor()
protected ListSE<CallableProcessingInterceptor> getCallableInterceptors()
protected ListSE<DeferredResultProcessingInterceptor> getDeferredResultInterceptors()