クラス StandardServletAsyncWebRequest
java.lang.ObjectSE
org.springframework.web.context.request.AbstractRequestAttributes
org.springframework.web.context.request.ServletRequestAttributes
org.springframework.web.context.request.ServletWebRequest
org.springframework.web.context.request.async.StandardServletAsyncWebRequest
- 実装されているすべてのインターフェース:
AsyncListenerEE、EventListenerSE、AsyncWebRequest、NativeWebRequest、RequestAttributes、WebRequest
public class StandardServletAsyncWebRequest
extends ServletWebRequest
implements AsyncWebRequest, AsyncListenerEE
AsyncWebRequest のサーブレット実装。 非同期リクエストに含まれるサーブレットとすべてのフィルターは、サーブレット API を使用するか、<async-supported>true</async-supported> 要素をサーブレットに追加して web.xml のフィルター宣言を有効にして、非同期サポートを有効にする必要があります。
- 導入:
- 3.2
- 作成者:
- Rossen Stoyanchev
フィールドのサマリー
クラス org.springframework.web.context.request.ServletRequestAttributes から継承されたフィールド
DESTRUCTION_CALLBACK_NAME_PREFIX, immutableValueTypesクラス org.springframework.web.context.request.AbstractRequestAttributes から継承されたフィールド
requestDestructionCallbacksインターフェース org.springframework.web.context.request.RequestAttributes から継承されたフィールド
REFERENCE_REQUEST, REFERENCE_SESSION, SCOPE_REQUEST, SCOPE_SESSIONコンストラクターの概要
コンストラクターコンストラクター説明StandardServletAsyncWebRequest(HttpServletRequestEE request, HttpServletResponseEE response) 指定されたリクエスト / レスポンスペアの新しいインスタンスを作成します。メソッドのサマリー
修飾子と型メソッド説明voidaddCompletionHandler(RunnableSE runnable) リクエスト処理が完了したときに呼び出すハンドラーを追加します。voidaddErrorHandler(ConsumerSE<ThrowableSE> exceptionHandler) リクエストの同時処理中にエラーが発生したときに呼び出すハンドラーを追加します。voidaddTimeoutHandler(RunnableSE timeoutHandler) 並行処理がタイムアウトしたときに呼び出すハンドラーを追加します。voiddispatch()アプリケーションスレッドでの同時実行後に処理を再開するために、コンテナーにリクエストをディスパッチします。boolean非同期リクエスト処理が完了したかどうか。booleanAsyncWebRequest.startAsync()の呼び出し後、リクエストが非同期モードかどうか。voidonComplete(AsyncEventEE event) voidonError(AsyncEventEE event) voidonStartAsync(AsyncEventEE event) voidonTimeout(AsyncEventEE event) voidsetTimeout(LongSE timeout) Servlet 3 非同期処理では、コンテナー処理スレッドが終了した後にタイムアウト期間が始まります。void非同期リクエスト処理の開始をマークして、メイン処理スレッドが終了したときに、別のスレッドでさらに処理するためにレスポンスが開いたままになるようにします。クラス org.springframework.web.context.request.ServletWebRequest から継承されたメソッド
checkNotModified, checkNotModified, checkNotModified, getContextPath, getDescription, getHeader, getHeaderNames, getHeaderValues, getHttpMethod, getLocale, getNativeRequest, getNativeRequest, getNativeResponse, getNativeResponse, getParameter, getParameterMap, getParameterNames, getParameterValues, getRemoteUser, getUserPrincipal, isNotModified, isSecure, isUserInRole, toStringクラス org.springframework.web.context.request.ServletRequestAttributes から継承されたメソッド
getAttribute, getAttributeNames, getRequest, getResponse, getSession, getSessionId, getSessionMutex, isImmutableSessionAttribute, registerDestructionCallback, registerSessionDestructionCallback, removeAttribute, resolveReference, setAttribute, updateAccessedSessionAttributesクラス org.springframework.web.context.request.AbstractRequestAttributes から継承されたメソッド
isRequestActive, registerRequestDestructionCallback, removeRequestDestructionCallback, requestCompletedクラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース org.springframework.web.context.request.NativeWebRequest から継承されたメソッド
getNativeRequest, getNativeRequest, getNativeResponse, getNativeResponseインターフェース org.springframework.web.context.request.RequestAttributes から継承されたメソッド
getAttribute, getAttributeNames, getSessionId, getSessionMutex, registerDestructionCallback, removeAttribute, resolveReference, setAttributeインターフェース org.springframework.web.context.request.WebRequest から継承されたメソッド
checkNotModified, checkNotModified, checkNotModified, getContextPath, getDescription, getHeader, getHeaderNames, getHeaderValues, getLocale, getParameter, getParameterMap, getParameterNames, getParameterValues, getRemoteUser, getUserPrincipal, isSecure, isUserInRole
コンストラクターの詳細
StandardServletAsyncWebRequest
指定されたリクエスト / レスポンスペアの新しいインスタンスを作成します。- パラメーター:
request- 現在の HTTP リクエストresponse- 現在の HTTP レスポンス
メソッドの詳細
setTimeout
Servlet 3 非同期処理では、コンテナー処理スレッドが終了した後にタイムアウト期間が始まります。- 次で指定:
- インターフェース
AsyncWebRequestのsetTimeout - パラメーター:
timeout- ミリ秒単位の時間。nullはタイムアウトがないことを意味します。つまり、コンテナーのデフォルトのタイムアウトに依存します。
addTimeoutHandler
インターフェースからコピーされた説明:AsyncWebRequest並行処理がタイムアウトしたときに呼び出すハンドラーを追加します。- 次で指定:
- インターフェース
AsyncWebRequestのaddTimeoutHandler
addErrorHandler
インターフェースからコピーされた説明:AsyncWebRequestリクエストの同時処理中にエラーが発生したときに呼び出すハンドラーを追加します。- 次で指定:
- インターフェース
AsyncWebRequestのaddErrorHandler
addCompletionHandler
インターフェースからコピーされた説明:AsyncWebRequestリクエスト処理が完了したときに呼び出すハンドラーを追加します。- 次で指定:
- インターフェース
AsyncWebRequestのaddCompletionHandler
isAsyncStarted
public boolean isAsyncStarted()インターフェースからコピーされた説明:AsyncWebRequestAsyncWebRequest.startAsync()の呼び出し後、リクエストが非同期モードかどうか。非同期処理が開始されなかった場合、完了した場合、リクエストがさらなる処理のためにディスパッチされた場合、"false" を返します。- 次で指定:
- インターフェース
AsyncWebRequestのisAsyncStarted
isAsyncComplete
public boolean isAsyncComplete()非同期リクエスト処理が完了したかどうか。非同期処理が完了した後、リクエストオブジェクトとレスポンスオブジェクトの使用を避けることが重要です。サーブレットコンテナーは、しばしば再利用します。
- 次で指定:
- インターフェース
AsyncWebRequestのisAsyncComplete
startAsync
public void startAsync()インターフェースからコピーされた説明:AsyncWebRequest非同期リクエスト処理の開始をマークして、メイン処理スレッドが終了したときに、別のスレッドでさらに処理するためにレスポンスが開いたままになるようにします。- 次で指定:
- インターフェース
AsyncWebRequestのstartAsync
dispatch
public void dispatch()インターフェースからコピーされた説明:AsyncWebRequestアプリケーションスレッドでの同時実行後に処理を再開するために、コンテナーにリクエストをディスパッチします。- 次で指定:
- インターフェース
AsyncWebRequestのdispatch
onStartAsync
- 次で指定:
- インターフェース
AsyncListenerEEのonStartAsyncEE - 例外:
IOExceptionSE
onTimeout
- 次で指定:
- インターフェース
AsyncListenerEEのonTimeoutEE - 例外:
IOExceptionSE
onError
- 次で指定:
- インターフェース
AsyncListenerEEのonErrorEE - 例外:
IOExceptionSE
onComplete
- 次で指定:
- インターフェース
AsyncListenerEEのonCompleteEE - 例外:
IOExceptionSE