クラス AbstractHandlerMethodAdapter
java.lang.ObjectSE
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter
- 実装されているすべてのインターフェース:
Aware、ApplicationContextAware、Ordered、ServletContextAware、HandlerAdapter
- 既知の直属サブクラス
RequestMappingHandlerAdapter
public abstract class AbstractHandlerMethodAdapter
extends WebContentGenerator
implements HandlerAdapter, Ordered
型
HandlerMethod のハンドラーをサポートする HandlerAdapter 実装の抽象基本クラス。- 導入:
- 3.1
- 作成者:
- Arjen Poutsma
フィールドのサマリー
クラス org.springframework.web.servlet.support.WebContentGenerator から継承されたフィールド
HEADER_CACHE_CONTROL, METHOD_GET, METHOD_HEAD, METHOD_POSTクラス org.springframework.context.support.ApplicationObjectSupport から継承されたフィールド
loggerインターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明final longgetLastModified(HttpServletRequestEE request, ObjectSE handler) この実装では、ハンドラーがHandlerMethodであると想定しています。protected abstract longgetLastModifiedInternal(HttpServletRequestEE request, HandlerMethod handlerMethod) 使用すべきではありません。intgetOrder()このオブジェクトの順序値を取得します。final ModelAndViewhandle(HttpServletRequestEE request, HttpServletResponseEE response, ObjectSE handler) この実装では、ハンドラーがHandlerMethodであると想定しています。protected abstract ModelAndViewhandleInternal(HttpServletRequestEE request, HttpServletResponseEE response, HandlerMethod handlerMethod) 指定されたハンドラーメソッドを使用して、リクエストを処理します。voidsetOrder(int order) この HandlerAdapter Bean の順序値を指定します。final booleanこの実装では、ハンドラーがHandlerMethodであると想定しています。protected abstract booleansupportsInternal(HandlerMethod handlerMethod) ハンドラーメソッドを指定して、このアダプターがそれをサポートできるかどうかを返します。クラス org.springframework.web.servlet.support.WebContentGenerator から継承されたメソッド
applyCacheControl, applyCacheSeconds, checkAndPrepare, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isRequireSession, prepareResponse, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setVaryByRequestHeadersクラス org.springframework.web.context.support.WebApplicationObjectSupport から継承されたメソッド
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextクラス org.springframework.context.support.ApplicationObjectSupport から継承されたメソッド
getApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
コンストラクターの詳細
AbstractHandlerMethodAdapter
public AbstractHandlerMethodAdapter()
メソッドの詳細
setOrder
public void setOrder(int order) この HandlerAdapter Bean の順序値を指定します。デフォルト値は
Ordered.LOWEST_PRECEDENCEで、順序なしを意味します。- 関連事項:
getOrder
public int getOrder()インターフェースからコピーされた説明:Orderedこのオブジェクトの順序値を取得します。値が高いほど、優先度は低くなります。結果として、最も低い値を持つオブジェクトが最高の優先度を持ちます(サーブレット
load-on-startupの値に多少似ています)。同じ順序の値は、影響を受けるオブジェクトの任意のソート位置になります。
supports
この実装では、ハンドラーがHandlerMethodであると想定しています。- 次で指定:
- インターフェース
HandlerAdapterのsupports - パラメーター:
handler- チェックするハンドラーインスタンス- 戻り値:
- このアダプターが指定されたハンドラーを適応できるかどうか
supportsInternal
ハンドラーメソッドを指定して、このアダプターがそれをサポートできるかどうかを返します。- パラメーター:
handlerMethod- チェックするハンドラーメソッド- 戻り値:
- このアダプターが特定の方法を適応できるかどうか
handle
@Nullable public final ModelAndView handle(HttpServletRequestEE request, HttpServletResponseEE response, ObjectSE handler) throws ExceptionSE この実装では、ハンドラーがHandlerMethodであると想定しています。- 次で指定:
- インターフェース
HandlerAdapterのhandle - パラメーター:
request- 現在の HTTP リクエストresponse- 現在の HTTP レスポンスhandler- 使用するハンドラー。このオブジェクトは、このインターフェースのsupportsメソッドに事前に渡されている必要があり、このメソッドはtrueを返している必要があります。- 戻り値:
- ビューの名前と必要なモデルデータを含む ModelAndView オブジェクト、またはリクエストが直接処理された場合は
null - 例外:
ExceptionSE- エラーの場合
handleInternal
@Nullable protected abstract ModelAndView handleInternal(HttpServletRequestEE request, HttpServletResponseEE response, HandlerMethod handlerMethod) throws ExceptionSE 指定されたハンドラーメソッドを使用して、リクエストを処理します。- パラメーター:
request- 現在の HTTP リクエストresponse- 現在の HTTP レスポンスhandlerMethod- 使用するハンドラーメソッド。このオブジェクトは以前にsupportsInternal(HandlerMethod)このインターフェースに渡されている必要があり、このインターフェースはtrueを返したはずです。- 戻り値:
- ビューの名前と必要なモデルデータを含む ModelAndView オブジェクト、またはリクエストが直接処理された場合は
null - 例外:
ExceptionSE- エラーの場合
getLastModified
この実装では、ハンドラーがHandlerMethodであると想定しています。- 次で指定:
- インターフェース
HandlerAdapterのgetLastModified - パラメーター:
request- 現在の HTTP リクエストhandler- 使用するハンドラー- 戻り値:
- 指定されたハンドラーの lastModified 値
getLastModifiedInternal
@DeprecatedSE protected abstract long getLastModifiedInternal(HttpServletRequestEE request, HandlerMethod handlerMethod) 使用すべきではありません。5.3.9 以降、LastModifiedも同様。- パラメーター:
request- 現在の HTTP リクエストhandlerMethod- 使用するハンドラーメソッド- 戻り値:
- 指定されたハンドラーの lastModified 値
LastModifiedも同様。