类 InvocableHandlerMethod
java.lang.Object
cn.taketoday.web.handler.method.HandlerMethod
cn.taketoday.web.handler.method.InvocableHandlerMethod
- 所有已实现的接口:
AsyncHandler
Extension of
HandlerMethod that invokes the underlying method with
argument values resolved from the current HTTP request through a list of
ParameterResolvingStrategy.- 从以下版本开始:
- 4.0 2022/4/8 23:12
- 作者:
- Rossen Stoyanchev, Juergen Hoeller, Sebastien Deleuze, Harry Yang
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.web.handler.method.HandlerMethod
HandlerMethod.ConcurrentResultHandlerMethod, HandlerMethod.HandlerMethodParameter -
字段概要
字段从类继承的字段 cn.taketoday.web.handler.method.HandlerMethod
log -
构造器概要
构造器构造器说明InvocableHandlerMethod(HandlerMethod handlerMethod, ResolvableParameterFactory factory) Create an instance from aHandlerMethod.InvocableHandlerMethod(Object bean, Method method, ResolvableParameterFactory factory) Create an instance from a bean instance and a method.InvocableHandlerMethod(String beanName, cn.taketoday.beans.factory.BeanFactory beanFactory, cn.taketoday.context.MessageSource messageSource, Method method, ResolvableParameterFactory factory) -
方法概要
修饰符和类型方法说明private voidapplyResponseStatus(RequestContext response) Set the response status according to theResponseStatusannotation.protected ObjectInvoke the handler method with the given argument values.protected Object[]getMethodArgumentValues(RequestContext request, Object[] providedArgs) Get the method argument values for the current request, checking the provided argument values and falling back to the configured argument resolvers.invokeAndHandle(RequestContext request) Invoke the method and handle the statusinvokeForRequest(RequestContext request, Object... providedArgs) Invoke the method after resolving its argument values in the context of the given request.从类继承的方法 cn.taketoday.web.handler.method.HandlerMethod
assertTargetBean, computeResponseBody, createWithResolvedBean, equals, findProvidedArgument, formatArgumentError, formatInvokeError, getBean, getBeanType, getBridgedMethod, getContentType, getMethod, getMethodAnnotation, getMethodParameters, getParameterCount, getRawReturnType, getResolvedFromHandlerMethod, getResponseStatus, getResponseStatus, getResponseStatus, getResponseStatusReason, getReturnType, getReturnValueType, getShortLogMessage, getStatusValue, hashCode, hasMethodAnnotation, isResponseBody, isResponseBody, isReturn, isReturnTypeAssignableTo, isVoid, setContentType, toString, unwrap, wrapConcurrentResult
-
字段详细资料
-
EMPTY_ARGS
-
resolvableParameters
-
-
构造器详细资料
-
InvocableHandlerMethod
Create an instance from aHandlerMethod. -
InvocableHandlerMethod
Create an instance from a bean instance and a method. -
InvocableHandlerMethod
public InvocableHandlerMethod(String beanName, cn.taketoday.beans.factory.BeanFactory beanFactory, @Nullable cn.taketoday.context.MessageSource messageSource, Method method, ResolvableParameterFactory factory)
-
-
方法详细资料
-
invokeAndHandle
Invoke the method and handle the status- 参数:
request- the current request- 抛出:
Throwable
-
applyResponseStatus
Set the response status according to theResponseStatusannotation.- 抛出:
IOException
-
invokeForRequest
@Nullable public Object invokeForRequest(RequestContext request, @Nullable Object... providedArgs) throws Throwable Invoke the method after resolving its argument values in the context of the given request.Argument values are commonly resolved through
ParameterResolvingStrategies. TheprovidedArgsparameter however may supply argument values to be used directly, i.e. without argument resolution. Examples of provided argument values include aWebDataBinder, aSessionStatus, or a thrown exception instance. Provided argument values are checked before argument resolvers.Delegates to
getMethodArgumentValues(cn.taketoday.web.RequestContext, java.lang.Object[])and callsdoInvoke(java.lang.Object[])with the resolved arguments. -
getMethodArgumentValues
protected Object[] getMethodArgumentValues(RequestContext request, @Nullable Object[] providedArgs) throws Throwable Get the method argument values for the current request, checking the provided argument values and falling back to the configured argument resolvers.The resulting array will be passed into
doInvoke(java.lang.Object[]).- 抛出:
Throwable
-
doInvoke
Invoke the handler method with the given argument values.- 抛出:
Exception
-