Class InvocableHandlerMethod
java.lang.Object
org.springframework.core.annotation.AnnotatedMethod
org.springframework.web.method.HandlerMethod
org.springframework.web.reactive.result.method.InvocableHandlerMethod
Extension of 
HandlerMethod that invokes the underlying method with
 argument values resolved from the current HTTP request through a list of
 HandlerMethodArgumentResolver.
 By default, the method invocation happens on the thread from which the
 Mono was subscribed to, or in some cases the thread that emitted one
 of the resolved arguments (for example, when the request body needs to be decoded).
 To ensure a predictable thread for the underlying method's invocation,
 a Scheduler can optionally be provided via
 setInvocationScheduler(Scheduler).
- Since:
- 5.0
- Author:
- Rossen Stoyanchev, Juergen Hoeller, Sebastien Deleuze
- 
Nested Class SummaryNested classes/interfaces inherited from class org.springframework.core.annotation.AnnotatedMethodAnnotatedMethod.AnnotatedMethodParameter
- 
Field SummaryFields inherited from class org.springframework.web.method.HandlerMethodlogger
- 
Constructor SummaryConstructorsConstructorDescriptionInvocableHandlerMethod(Object bean, Method method) Create an instance from a bean instance and a method.InvocableHandlerMethod(HandlerMethod handlerMethod) Create an instance from aHandlerMethod.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the configured parameter name discoverer.Return the configured argument resolvers.reactor.core.publisher.Mono<HandlerResult>invoke(ServerWebExchange exchange, BindingContext bindingContext, Object... providedArgs) Invoke the method for the given exchange.voidsetArgumentResolvers(List<? extends HandlerMethodArgumentResolver> resolvers) Configure the argument resolvers to use for resolving method argument values against aServerWebExchange.voidsetInvocationScheduler(reactor.core.scheduler.Scheduler invocationScheduler) Set theScheduleron which to perform the method invocation.voidsetMethodValidator(MethodValidator methodValidator) Set theMethodValidatorto perform method validation with if the controller methodHandlerMethod.shouldValidateArguments()orHandlerMethod.shouldValidateReturnValue().voidsetParameterNameDiscoverer(ParameterNameDiscoverer nameDiscoverer) Set the ParameterNameDiscoverer for resolving parameter names when needed (for example, default request attribute name).voidConfigure a reactive adapter registry.Methods inherited from class org.springframework.web.method.HandlerMethodassertTargetBean, createWithResolvedBean, createWithValidateFlags, equals, formatInvokeError, getBean, getBeanType, getContainingClass, getResolvedFromHandlerMethod, getResponseStatus, getResponseStatusReason, getShortLogMessage, hashCode, shouldValidateArguments, shouldValidateReturnValue, toStringMethods inherited from class org.springframework.core.annotation.AnnotatedMethodfindProvidedArgument, formatArgumentError, getBridgedMethod, getMethod, getMethodAnnotation, getMethodParameters, getReturnType, getReturnValueType, hasMethodAnnotation, isVoid
- 
Constructor Details- 
InvocableHandlerMethodCreate an instance from aHandlerMethod.
- 
InvocableHandlerMethodCreate an instance from a bean instance and a method.
 
- 
- 
Method Details- 
setArgumentResolversConfigure the argument resolvers to use for resolving method argument values against aServerWebExchange.
- 
getResolversReturn the configured argument resolvers.
- 
setParameterNameDiscovererSet the ParameterNameDiscoverer for resolving parameter names when needed (for example, default request attribute name).Default is a DefaultParameterNameDiscoverer.
- 
getParameterNameDiscovererReturn the configured parameter name discoverer.
- 
setReactiveAdapterRegistryConfigure a reactive adapter registry. This is needed for cases where the response is fully handled within the controller in combination with an async void return value.By default this is a ReactiveAdapterRegistrywith default settings.
- 
setMethodValidatorSet theMethodValidatorto perform method validation with if the controller methodHandlerMethod.shouldValidateArguments()orHandlerMethod.shouldValidateReturnValue().- Since:
- 6.1
 
- 
setInvocationSchedulerSet theScheduleron which to perform the method invocation.- Since:
- 6.1.6
 
- 
invokepublic reactor.core.publisher.Mono<HandlerResult> invoke(ServerWebExchange exchange, BindingContext bindingContext, Object... providedArgs) Invoke the method for the given exchange.- Parameters:
- exchange- the current exchange
- bindingContext- the binding context to use
- providedArgs- optional list of argument values to match by type
- Returns:
- a Mono with a HandlerResult
 
 
-