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, java.lang.Object handler) この実装では、ハンドラーが HandlerMethod であると想定しています。 |
protected abstract long | getLastModifiedInternal(HttpServletRequestEE request, HandlerMethod handlerMethod) |
int | getOrder() このオブジェクトの順序値を取得します。 |
ModelAndView | handle(HttpServletRequestEE request, HttpServletResponseEE response, java.lang.Object handler) この実装では、ハンドラーが HandlerMethod であると想定しています。 |
protected abstract ModelAndView | handleInternal(HttpServletRequestEE request, HttpServletResponseEE response, HandlerMethod handlerMethod) 指定されたハンドラーメソッドを使用して、リクエストを処理します。 |
void | setOrder(int order) この HandlerAdapter Bean の順序値を指定します。 |
boolean | supports(java.lang.Object 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
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(java.lang.Object handler)
HandlerMethod
であると想定しています。HandlerAdapter
の supports
handler
- チェックするハンドラーインスタンス protected abstract boolean supportsInternal(HandlerMethod handlerMethod)
handlerMethod
- チェックするハンドラーメソッド @Nullable public final ModelAndView handle(HttpServletRequestEE request, HttpServletResponseEE response, java.lang.Object handler) throws java.lang.Exception
HandlerMethod
であると想定しています。HandlerAdapter
の handle
request
- 現在の HTTP リクエスト response
- 現在の HTTP レスポンス handler
- 使用するハンドラー。このオブジェクトは、このインターフェースの supports
メソッドに事前に渡されている必要があり、true
を返している必要があります。null
java.lang.Exception
- エラーの場合 @Nullable protected abstract ModelAndView handleInternal(HttpServletRequestEE request, HttpServletResponseEE response, HandlerMethod handlerMethod) throws java.lang.Exception
request
- 現在の HTTP リクエスト response
- 現在の HTTP レスポンス handlerMethod
- 使用するハンドラーメソッド。このオブジェクトは以前に supportsInternal(HandlerMethod)
このインターフェースに渡されている必要があり、このインターフェースは true
を返したはずです。null
java.lang.Exception
- エラーの場合 public final long getLastModified(HttpServletRequestEE request, java.lang.Object handler)
HandlerMethod
であると想定しています。HandlerAdapter
の getLastModified
request
- 現在の HTTP リクエスト handler
- 使用するハンドラー HttpServlet.getLastModified(javax.servlet.http.HttpServletRequest)
EE, LastModified.getLastModified(javax.servlet.http.HttpServletRequest)
protected abstract long getLastModifiedInternal(HttpServletRequestEE request, HandlerMethod handlerMethod)
request
- 現在の HTTP リクエスト handlerMethod
- 使用するハンドラーメソッド