クラス 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
フィールドのサマリー
クラス WebContentGenerator から継承されたフィールド
HEADER_CACHE_CONTROL, METHOD_GET, METHOD_HEAD, METHOD_POSTクラス ApplicationObjectSupport から継承されたフィールド
loggerインターフェース Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明intgetOrder()このオブジェクトの順序値を取得します。final @Nullable ModelAndViewhandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, ObjectSE handler) この実装では、ハンドラーがHandlerMethodであると想定しています。protected abstract @Nullable ModelAndViewhandleInternal(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, HandlerMethod handlerMethod) 指定されたハンドラーメソッドを使用して、リクエストを処理します。voidsetOrder(int order) この HandlerAdapter Bean の順序値を指定します。final booleanこの実装では、ハンドラーがHandlerMethodであると想定しています。protected abstract booleansupportsInternal(HandlerMethod handlerMethod) ハンドラーメソッドを指定して、このアダプターがそれをサポートできるかどうかを返します。クラス WebContentGenerator から継承されたメソッド
applyCacheControl, applyCacheSeconds, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isRequireSession, prepareResponse, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setVaryByRequestHeadersクラス WebApplicationObjectSupport から継承されたメソッド
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
コンストラクターの詳細
AbstractHandlerMethodAdapter
public AbstractHandlerMethodAdapter()
メソッドの詳細
setOrder
public void setOrder(int order) この HandlerAdapter Bean の順序値を指定します。デフォルト値は
Ordered.LOWEST_PRECEDENCEで、順序なしを意味します。- 関連事項:
getOrder
supports
この実装では、ハンドラーがHandlerMethodであると想定しています。- 次で指定:
- インターフェース
HandlerAdapterのsupports - パラメーター:
handler- チェックするハンドラーインスタンス- 戻り値:
- このアダプターが指定されたハンドラーを適応できるかどうか
supportsInternal
ハンドラーメソッドを指定して、このアダプターがそれをサポートできるかどうかを返します。- パラメーター:
handlerMethod- チェックするハンドラーメソッド- 戻り値:
- このアダプターが特定の方法を適応できるかどうか
handle
public final @Nullable ModelAndView handle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, ObjectSE handler) throws ExceptionSE この実装では、ハンドラーがHandlerMethodであると想定しています。- 次で指定:
- インターフェース
HandlerAdapterのhandle - パラメーター:
request- 現在の HTTP リクエストresponse- 現在の HTTP レスポンスhandler- 使用するハンドラー。このオブジェクトは、このインターフェースのsupportsメソッドに事前に渡されている必要があり、このメソッドはtrueを返している必要があります。- 戻り値:
- ビューの名前と必要なモデルデータを含む ModelAndView オブジェクト、またはリクエストが直接処理された場合は
null - 例外:
ExceptionSE- エラーの場合
handleInternal
protected abstract @Nullable ModelAndView handleInternal(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, HandlerMethod handlerMethod) throws ExceptionSE 指定されたハンドラーメソッドを使用して、リクエストを処理します。- パラメーター:
request- 現在の HTTP リクエストresponse- 現在の HTTP レスポンスhandlerMethod- 使用するハンドラーメソッド。このオブジェクトは以前にsupportsInternal(HandlerMethod)このインターフェースに渡されている必要があり、このインターフェースはtrueを返したはずです。- 戻り値:
- ビューの名前と必要なモデルデータを含む ModelAndView オブジェクト、またはリクエストが直接処理された場合は
null - 例外:
ExceptionSE- エラーの場合