类 AbstractHandlerMethodAdapter
java.lang.Object
cn.taketoday.context.support.ApplicationObjectSupport
cn.taketoday.web.WebContentGenerator
cn.taketoday.web.handler.method.AbstractHandlerMethodAdapter
- 所有已实现的接口:
cn.taketoday.beans.factory.Aware,cn.taketoday.context.ApplicationContextAware,cn.taketoday.core.Ordered,HandlerAdapter
- 直接已知子类:
RequestMappingHandlerAdapter
public abstract class AbstractHandlerMethodAdapter
extends WebContentGenerator
implements HandlerAdapter, cn.taketoday.core.Ordered
Abstract base class for
HandlerAdapter implementations that support
handlers of type HandlerMethod.- 从以下版本开始:
- 4.0 2022/4/8 22:46
- 作者:
- Arjen Poutsma, Harry Yang
-
字段概要
字段从类继承的字段 cn.taketoday.web.WebContentGenerator
HEADER_CACHE_CONTROL, METHOD_GET, METHOD_HEAD, METHOD_POST从类继承的字段 cn.taketoday.context.support.ApplicationObjectSupport
applicationContext, log, messageSourceAccessor从接口继承的字段 cn.taketoday.web.HandlerAdapter
HANDLER_ADAPTER_BEAN_NAME, NONE_RETURN_VALUE从接口继承的字段 cn.taketoday.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明intgetOrder()final Objecthandle(RequestContext request, Object handler) This implementation expects the handler to be anHandlerMethod.protected abstract ObjecthandleInternal(RequestContext request, HandlerMethod handlerMethod) Use the given handler method to handle the request.voidsetOrder(int order) Specify the order value for this HandlerAdapter bean.final booleanThis implementation expects the handler to be anHandlerMethod.protected abstract booleansupportsInternal(HandlerMethod handlerMethod) Given a handler method, return whether this adapter can support it.从类继承的方法 cn.taketoday.web.WebContentGenerator
applyCacheControl, applyCacheSeconds, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isRequireSession, prepareResponse, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setVaryByRequestHeaders从类继承的方法 cn.taketoday.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContext, unwrapContext, unwrapFactory
-
字段详细资料
-
order
private int order
-
-
构造器详细资料
-
AbstractHandlerMethodAdapter
public AbstractHandlerMethodAdapter()
-
-
方法详细资料
-
setOrder
public void setOrder(int order) Specify the order value for this HandlerAdapter bean.The default value is
Ordered.LOWEST_PRECEDENCE, meaning non-ordered.- 另请参阅:
-
Ordered.getOrder()
-
getOrder
public int getOrder()- 指定者:
getOrder在接口中cn.taketoday.core.Ordered
-
supports
This implementation expects the handler to be anHandlerMethod.- 指定者:
supports在接口中HandlerAdapter- 参数:
handler- the handler instance to check- 返回:
- whether this adapter can adapt the given handler
-
supportsInternal
Given a handler method, return whether this adapter can support it.- 参数:
handlerMethod- the handler method to check- 返回:
- whether this adapter can adapt the given method
-
handle
This implementation expects the handler to be anHandlerMethod.- 指定者:
handle在接口中HandlerAdapter- 参数:
request- current HTTP request contexthandler- handler to use. This object must have previously been passed to thesupportsmethod of this interface, which must have returnedtrue.- 返回:
- an object with the name of the view and the required model data, or
nullif the request has been handled directly - 抛出:
Throwable- in case of errors- 另请参阅:
-
handleInternal
@Nullable protected abstract Object handleInternal(RequestContext request, HandlerMethod handlerMethod) throws Throwable Use the given handler method to handle the request.- 参数:
request- current HTTP requesthandlerMethod- handler method to use. This object must have previously been passed to thesupportsInternal(HandlerMethod)this interface, which must have returnedtrue.- 返回:
- an object to render, or
null - 抛出:
Exception- in case of errorsThrowable
-