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
defaultLogger, 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<Object> |
invoke(Message<?> message,
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.
|
assertTargetBean, createWithResolvedBean, equals, findProvidedArgument, formatArgumentError, formatInvokeError, getBean, getBeanType, getBridgedMethod, getLogger, getMethod, getMethodAnnotation, getMethodParameters, getResolvedFromHandlerMethod, getReturnType, getReturnValueType, getShortLogMessage, hashCode, hasMethodAnnotation, isVoid, setLogger, 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<Object> invoke(Message<?> message, Object... providedArgs)
message
- the current messageprovidedArgs
- optional list of argument values to match by type