类的使用
cn.taketoday.web.handler.method.HandlerMethod
使用HandlerMethod的程序包
程序包
说明
Request context parameter resolvers
Web Handler
Method handler
-
cn.taketoday.web.bind.resolver中HandlerMethod的使用
修饰符和类型方法说明booleanHttpEntityMethodProcessor.supportsHandlerMethod(HandlerMethod handlerMethod) booleanMapMethodProcessor.supportsHandlerMethod(HandlerMethod handler) booleanRequestResponseBodyMethodProcessor.supportsHandlerMethod(HandlerMethod handler) -
cn.taketoday.web.handler中HandlerMethod的使用
参数类型为HandlerMethod的cn.taketoday.web.handler中的方法修饰符和类型方法说明HandlerMethodMappingNamingStrategy.getName(HandlerMethod handlerMethod, T mapping) Determine the name for the given HandlerMethod and mapping.protected abstract ObjectAbstractActionMappingMethodExceptionHandler.handleInternal(RequestContext request, HandlerMethod handlerMethod, Throwable ex) Actually resolve the given exception that got thrown during on handler execution, returning a view(result) that represents a specific error page if appropriate.protected ObjectSimpleActionMappingMethodExceptionHandler.handleInternal(RequestContext context, HandlerMethod handlerMethod, Throwable ex) -
cn.taketoday.web.handler.method中HandlerMethod的使用
修饰符和类型类说明protected static classclassExtension ofHandlerMethodthat invokes the underlying method with argument values resolved from the current HTTP request through a list ofParameterResolvingStrategy.修饰符和类型字段说明private final HandlerMethodAbstractHandlerMethodMapping.MappingRegistration.handlerMethodhandlerMethod记录组件的字段。private final HandlerMethodActionMappingAnnotationHandler.handlerMethodprivate final HandlerMethodInitBinderBindingContext.handlerMethodprivate static final HandlerMethodAbstractHandlerMethodMapping.PREFLIGHT_AMBIGUOUS_MATCHprivate HandlerMethodHandlerMethod.resolvedFromHandlerMethodprivate final HandlerMethodHandlerMethod.ConcurrentResultHandlerMethod.target类型参数类型为HandlerMethod的cn.taketoday.web.handler.method中的字段修饰符和类型字段说明private final ConcurrentHashMap<HandlerMethod,CorsConfiguration> AbstractHandlerMethodMapping.MappingRegistry.corsLookupprivate final ConcurrentHashMap<HandlerMethod,InvocableHandlerMethod> ControllerMethodResolver.invocableHandlerMethodMapprivate final ConcurrentHashMap<String,List<HandlerMethod>> AbstractHandlerMethodMapping.MappingRegistry.nameLookup修饰符和类型方法说明protected HandlerMethodAbstractHandlerMethodMapping.createHandlerMethod(Object handler, Method method) Create the HandlerMethod instance.protected HandlerMethodRequestMappingHandlerMapping.createHandlerMethod(Object handler, Method method) HandlerMethod.createWithResolvedBean()If the provided instance contains a bean name rather than an object instance, the bean name is resolved before aHandlerMethodis created and returned.protected HandlerMethodAbstractHandlerMethodMapping.getHandlerInternal(RequestContext context) Look up a handler method for the given request.AbstractHandlerMethodMapping.Match.getHandlerMethod()ActionMappingAnnotationHandler.getMethod()HandlerMethod.getResolvedFromHandlerMethod()Return the HandlerMethod from which this HandlerMethod instance was resolved viacreateWithResolvedBean().protected HandlerMethodAbstractHandlerMethodMapping.handleNoMatch(Set<T> mappings, String lookupPath, RequestContext request) Invoked when no matching mapping is not found.protected HandlerMethodRequestMappingInfoHandlerMapping.handleNoMatch(Set<RequestMappingInfo> infos, String lookupPath, RequestContext request) Iterate all RequestMappingInfo's once again, look if any match by URL at least and raise exceptions according to what doesn't match.AbstractHandlerMethodMapping.MappingRegistration.handlerMethod()返回handlerMethod记录组件的值。protected HandlerMethodAbstractHandlerMethodMapping.lookupHandlerMethod(String directLookupPath, RequestContext request) Look up the best-matching handler method for the current request.static HandlerMethod返回变量类型为HandlerMethod的类型的cn.taketoday.web.handler.method中的方法修饰符和类型方法说明AbstractHandlerMethodMapping.getHandlerMethods()Return a (read-only) map with all mappings and HandlerMethod's.AbstractHandlerMethodMapping.MappingRegistry.getHandlerMethodsByMappingName(String mappingName) Return handler methods by mapping name.AbstractHandlerMethodMapping.getHandlerMethodsForMappingName(String mappingName) Return the handler methods for the given mapping name.修饰符和类型方法说明private voidAbstractHandlerMethodMapping.MappingRegistry.addMappingName(String name, HandlerMethod handlerMethod) ResolvableParameterFactory.createArray(HandlerMethod handlerMethod) ControllerMethodResolver.createHandlerMethod(HandlerMethod handlerMethod) Create aInvocableHandlerMethodfrom the givenHandlerMethoddefinition.protected HandlerInterceptor[]AbstractHandlerMethodMapping.MappingRegistry.createValue(Method method, HandlerMethod handlerMethod) ModelHandler.findSessionAttributeArguments(SessionAttributesHandler sessionAttrHandler, HandlerMethod handlerMethod) Find@ModelAttributearguments also listed as@SessionAttributes.ControllerMethodResolver.getBinderMethods(HandlerMethod handlerMethod) private Class<?>AbstractHandlerMethodMapping.MappingRegistry.getControllerClass(Method method, HandlerMethod handlerMethod) AbstractHandlerMethodMapping.MappingRegistry.getCorsConfiguration(HandlerMethod handlerMethod) Return CORS configuration.AbstractHandlerMethodMapping.MappingRegistry.getHandlerInterceptors(HandlerMethod handlerMethod) ControllerMethodResolver.getModelAttributeMethods(HandlerMethod handlerMethod) private ArrayList<ModelHandler.ModelMethod>ModelHandler.getModelMethods(HandlerMethod handlerMethod) RequestMappingInfoHandlerMethodMappingNamingStrategy.getName(HandlerMethod handlerMethod, RequestMappingInfo mapping) static StringModelHandler.getNameForReturnValue(Object returnValue, HandlerMethod handler) Derive the model attribute name for the given return value.ResolvableParameterFactory.getParameters(HandlerMethod handlerMethod) ControllerMethodResolver.getSessionAttributesHandler(HandlerMethod handlerMethod) Return theSessionAttributesHandlerinstance for the given handler type (nevernull).voidModelAttributeMethodProcessor.handleHandlerMethodReturnValue(RequestContext context, HandlerMethod handler, Object returnValue) Add non-null return values to theBindingContext.protected abstract ObjectAbstractHandlerMethodAdapter.handleInternal(RequestContext request, HandlerMethod handlerMethod) Use the given handler method to handle the request.protected ObjectExceptionHandlerAnnotationExceptionHandler.handleInternal(RequestContext context, HandlerMethod handlerMethod, Throwable target) protected ObjectRequestMappingHandlerAdapter.handleInternal(RequestContext request, HandlerMethod handlerMethod) protected CorsConfigurationAbstractHandlerMethodMapping.initCorsConfiguration(Object handler, HandlerMethod handlerMethod, Method method, T mapping) Extract and return the CORS configuration for the mapping.protected CorsConfigurationRequestMappingHandlerMapping.initCorsConfiguration(Object handler, HandlerMethod handlerMethod, Method method, RequestMappingInfo mappingInfo) voidModelHandler.initModel(RequestContext request, BindingContext container, HandlerMethod handlerMethod) Populate the model in the following order: Retrieve "known" session attributes listed as@SessionAttributes.protected ObjectRequestMappingHandlerAdapter.invokeHandlerMethod(RequestContext request, HandlerMethod handlerMethod) Invoke theRequestMappinghandler method preparing aModelAndViewif view resolution is required.protected booleanInitBinderBindingContext.isBinderMethodApplicable(HandlerMethod initBinderMethod, WebDataBinder dataBinder) Determine whether the given@InitBindermethod should be used to initialize the givenWebDataBinderinstance.protected ActionMappingAnnotationHandlerExceptionHandlerAnnotationExceptionHandler.lookupExceptionHandler(HandlerMethod handlerMethod, Throwable exception) Find an@ExceptionHandlermethod for the given exception.booleanModelAttributeMethodProcessor.supportsHandlerMethod(HandlerMethod handler) Returntrueif there is a method-level@ModelAttributeor, in default resolution mode, for any return value type that is not a simple type.protected abstract booleanAbstractHandlerMethodAdapter.supportsInternal(HandlerMethod handlerMethod) Given a handler method, return whether this adapter can support it.protected booleanRequestMappingHandlerAdapter.supportsInternal(HandlerMethod handlerMethod) Always returntruesince any method argument and return value type will be processed in some way.private voidAbstractHandlerMethodMapping.MappingRegistry.validateMethodMapping(HandlerMethod handlerMethod, T mapping) 类型变量类型为HandlerMethod的cn.taketoday.web.handler.method中的方法参数修饰符和类型方法说明protected voidAbstractHandlerMethodMapping.handlerMethodsInitialized(Map<T, HandlerMethod> handlerMethods) Invoked after all handler methods have been detected.参数类型为HandlerMethod的cn.taketoday.web.handler.method中的构造器限定符构造器说明ActionMappingAnnotationHandler(HandlerMethod handlerMethod, ResolvableMethodParameter[] parameters, Class<?> beanType) ConcurrentResultHandlerMethod(Object asyncResult, HandlerMethod.ConcurrentResultMethodParameter returnType, HandlerMethod target) protectedHandlerMethod(HandlerMethod handlerMethod) Copy constructor for use in subclasses.privateHandlerMethod(HandlerMethod handlerMethod, Object handler) Re-create HandlerMethod with the resolved handler.(专用程序包)InitBinderBindingContext(ModelHandler modelHandler, WebBindingInitializer initializer, ControllerMethodResolver methodResolver, HandlerMethod handlerMethod) Create a new InitBinderBindingContext instance.(专用程序包)InitBinderBindingContext(ModelHandler modelHandler, WebBindingInitializer initializer, ControllerMethodResolver methodResolver, List<InvocableHandlerMethod> binderMethods, HandlerMethod handlerMethod) Create a new InitBinderBindingContext instance.InvocableHandlerMethod(HandlerMethod handlerMethod, ResolvableParameterFactory factory) Create an instance from aHandlerMethod.(专用程序包)MappingRegistration(T mapping, HandlerMethod handlerMethod, Set<String> directPaths, String mappingName, boolean hasCorsConfig) 创建MappingRegistration记录的实例。(专用程序包)SingletonActionMappingAnnotationHandler(Object handlerBean, HandlerMethod handlerMethod, ResolvableMethodParameter[] parameters, Class<?> beanType) (专用程序包)SuppliedActionMappingAnnotationHandler(Supplier<Object> beanSupplier, HandlerMethod handlerMethod, ResolvableMethodParameter[] parameters, Class<?> beanType) -
cn.taketoday.web.handler.result中HandlerMethod的使用
修饰符和类型方法说明default voidHandlerMethodReturnValueHandler.handleHandlerMethodReturnValue(RequestContext context, HandlerMethod handler, Object returnValue) Handle result of the handlerbooleanAsyncTaskMethodReturnValueHandler.supportsHandlerMethod(HandlerMethod handler) booleanCallableMethodReturnValueHandler.supportsHandlerMethod(HandlerMethod handler) booleanDeferredResultReturnValueHandler.supportsHandlerMethod(HandlerMethod handler) default booleanHandlerMethodReturnValueHandler.supportsHandlerMethod(HandlerMethod handler) Whether the given method is supported by this handler.booleanHttpHeadersReturnValueHandler.supportsHandlerMethod(HandlerMethod handler) booleanHttpStatusReturnValueHandler.supportsHandlerMethod(HandlerMethod handler) booleanObjectHandlerMethodReturnValueHandler.supportsHandlerMethod(HandlerMethod handler) booleanRenderedImageReturnValueHandler.supportsHandlerMethod(HandlerMethod handler) booleanStreamingResponseBodyReturnValueHandler.supportsHandlerMethod(HandlerMethod handler) booleanVoidReturnValueHandler.supportsHandlerMethod(HandlerMethod handlerMethod)