public class InvocableHandlerMethod extends HandlerMethod
HandlerMethod
that invokes the underlying method with
argument values resolved from the current HTTP request through a list of
HandlerMethodArgumentResolver
.HandlerMethod.HandlerMethodParameter
logger
Constructor and Description |
---|
InvocableHandlerMethod(HandlerMethod handlerMethod)
Create an instance from a
HandlerMethod . |
InvocableHandlerMethod(Object bean,
Method method)
Create an instance from a bean instance and a method.
|
Modifier and Type | Method and Description |
---|---|
ParameterNameDiscoverer |
getParameterNameDiscoverer()
Return the configured parameter name discoverer.
|
List<HandlerMethodArgumentResolver> |
getResolvers()
Return the configured argument resolvers.
|
reactor.core.publisher.Mono<HandlerResult> |
invoke(ServerWebExchange exchange,
BindingContext bindingContext,
Object... providedArgs)
Invoke the method for the given exchange.
|
void |
setArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers)
Configure the argument resolvers to use to use for resolving method
argument values against a
ServerWebExchange . |
void |
setParameterNameDiscoverer(ParameterNameDiscoverer nameDiscoverer)
Set the ParameterNameDiscoverer for resolving parameter names when needed
(e.g.
|
void |
setReactiveAdapterRegistry(ReactiveAdapterRegistry registry)
Configure a reactive adapter registry.
|
createWithResolvedBean, equals, getBean, getBeanType, getBridgedMethod, getMethod, getMethodAnnotation, getMethodParameters, getResolvedFromHandlerMethod, getResponseStatus, getResponseStatusReason, getReturnType, getReturnValueType, getShortLogMessage, hashCode, hasMethodAnnotation, isVoid, toString
public InvocableHandlerMethod(HandlerMethod handlerMethod)
HandlerMethod
.public void setArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers)
ServerWebExchange
.public List<HandlerMethodArgumentResolver> getResolvers()
public void setParameterNameDiscoverer(ParameterNameDiscoverer nameDiscoverer)
Default is a DefaultParameterNameDiscoverer
.
public ParameterNameDiscoverer getParameterNameDiscoverer()
public void setReactiveAdapterRegistry(ReactiveAdapterRegistry registry)
By default this is a ReactiveAdapterRegistry
with default settings.
public reactor.core.publisher.Mono<HandlerResult> invoke(ServerWebExchange exchange, BindingContext bindingContext, Object... providedArgs)
exchange
- the current exchangebindingContext
- the binding context to useprovidedArgs
- optional list of argument values to match by typeHandlerResult