public abstract class AbstractHandlerMethodAdapter extends WebContentGenerator implements HandlerAdapter, Ordered
HandlerMethod
のハンドラーをサポートする HandlerAdapter
実装の抽象基本クラス。HEADER_CACHE_CONTROL, METHOD_GET, METHOD_HEAD, METHOD_POST
logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターと説明 |
---|
AbstractHandlerMethodAdapter() |
修飾子と型 | メソッドと説明 |
---|---|
long | getLastModified(HttpServletRequestEE request, ObjectSE handler) この実装では、ハンドラーが HandlerMethod であると想定しています。 |
protected abstract long | getLastModifiedInternal(HttpServletRequestEE request, HandlerMethod handlerMethod) 使用すべきではありません。 5.3.9 以降、 LastModified も同様。 |
int | getOrder() このオブジェクトの順序値を取得します。 |
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 の順序値を指定します。 |
boolean | supports(ObjectSE handler) この実装では、ハンドラーが HandlerMethod であると想定しています。 |
protected abstract boolean | supportsInternal(HandlerMethod handlerMethod) ハンドラーメソッドを指定して、このアダプターがそれをサポートできるかどうかを返します。 |
applyCacheControl, applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, prepareResponse, preventCaching, setAlwaysMustRevalidate, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader, setVaryByRequestHeaders
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setOrder(int order)
デフォルト値は Ordered.LOWEST_PRECEDENCE
で、順序なしを意味します。
Ordered.getOrder()
public int getOrder()
Ordered
値が高いほど、優先度は低くなります。結果として、最も低い値を持つオブジェクトが最高の優先度を持ちます(サーブレット load-on-startup
の値に多少似ています)。
同じ順序の値は、影響を受けるオブジェクトの任意のソート位置になります。
Ordered
の getOrder
Ordered.HIGHEST_PRECEDENCE
, Ordered.LOWEST_PRECEDENCE
public final boolean supports(ObjectSE handler)
HandlerMethod
であると想定しています。HandlerAdapter
の supports
handler
- チェックするハンドラーインスタンス protected abstract boolean supportsInternal(HandlerMethod handlerMethod)
handlerMethod
- チェックするハンドラーメソッド @Nullable public final ModelAndView handle(HttpServletRequestEE request, HttpServletResponseEE response, ObjectSE handler) throws ExceptionSE
HandlerMethod
であると想定しています。HandlerAdapter
の handle
request
- 現在の HTTP リクエスト response
- 現在の HTTP レスポンス handler
- 使用するハンドラー。このオブジェクトは、このインターフェースの supports
メソッドに事前に渡されている必要があり、このメソッドは true
を返している必要があります。null
ExceptionSE
- エラーの場合 @Nullable protected abstract ModelAndView handleInternal(HttpServletRequestEE request, HttpServletResponseEE response, HandlerMethod handlerMethod) throws ExceptionSE
request
- 現在の HTTP リクエスト response
- 現在の HTTP レスポンス handlerMethod
- 使用するハンドラーメソッド。このオブジェクトは以前に supportsInternal(HandlerMethod)
このインターフェースに渡されている必要があり、このインターフェースは true
を返したはずです。null
ExceptionSE
- エラーの場合 public final long getLastModified(HttpServletRequestEE request, ObjectSE handler)
HandlerMethod
であると想定しています。HandlerAdapter
の getLastModified
request
- 現在の HTTP リクエスト handler
- 使用するハンドラー @DeprecatedSE protected abstract long getLastModifiedInternal(HttpServletRequestEE request, HandlerMethod handlerMethod)
LastModified
と一緒に 5.3.9 の時点で。request
- 現在の HTTP リクエスト handlerMethod
- 使用するハンドラーメソッド