クラス 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 long
getLastModified
(HttpServletRequestEE request, ObjectSE handler) この実装では、ハンドラーがHandlerMethod
であると想定しています。protected abstract long
getLastModifiedInternal
(HttpServletRequestEE request, HandlerMethod handlerMethod) 使用すべきではありません。int
getOrder()
このオブジェクトの順序値を取得します。final ModelAndView
handle
(HttpServletRequestEE request, HttpServletResponseEE response, ObjectSE handler) この実装では、ハンドラーがHandlerMethod
であると想定しています。protected abstract ModelAndView
handleInternal
(HttpServletRequestEE request, HttpServletResponseEE response, HandlerMethod handlerMethod) 指定されたハンドラーメソッドを使用して、リクエストを処理します。void
setOrder
(int order) この HandlerAdapter Bean の順序値を指定します。final boolean
この実装では、ハンドラーがHandlerMethod
であると想定しています。protected abstract boolean
supportsInternal
(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
も同様。