Class InvocableHandlerMethod
java.lang.Object
org.springframework.core.annotation.AnnotatedMethod
org.springframework.messaging.handler.HandlerMethod
org.springframework.messaging.handler.invocation.reactive.InvocableHandlerMethod
Extension of
HandlerMethod
that invokes the underlying method with
argument values resolved from the current HTTP request through a list of
HandlerMethodArgumentResolver
.- Since:
- 5.2
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.annotation.AnnotatedMethod
AnnotatedMethod.AnnotatedMethodParameter
-
Field Summary
Fields inherited from class org.springframework.messaging.handler.HandlerMethod
defaultLogger, logger
-
Constructor Summary
ConstructorDescriptionInvocableHandlerMethod
(Object bean, Method method) Create an instance from a bean instance and a method.InvocableHandlerMethod
(HandlerMethod handlerMethod) Create an instance from aHandlerMethod
. -
Method Summary
Modifier and TypeMethodDescriptionReturn the configured parameter name discoverer.Return the configured argument resolvers.reactor.core.publisher.Mono<Object>
Invoke the method for the given exchange.void
setArgumentResolvers
(List<HandlerMethodArgumentResolver> resolvers) Configure the argument resolvers to use for resolving method argument values against aServerWebExchange
.void
setParameterNameDiscoverer
(ParameterNameDiscoverer nameDiscoverer) Set the ParameterNameDiscoverer for resolving parameter names when needed (for example, default request attribute name).void
Configure a reactive adapter registry.Methods inherited from class org.springframework.messaging.handler.HandlerMethod
assertTargetBean, createWithResolvedBean, equals, formatInvokeError, getBean, getBeanType, getContainingClass, getLogger, getResolvedFromHandlerMethod, getShortLogMessage, hashCode, setLogger
Methods inherited from class org.springframework.core.annotation.AnnotatedMethod
findProvidedArgument, formatArgumentError, getBridgedMethod, getMethod, getMethodAnnotation, getMethodParameters, getReturnType, getReturnValueType, hasMethodAnnotation, isVoid, toString
-
Constructor Details
-
InvocableHandlerMethod
Create an instance from aHandlerMethod
. -
InvocableHandlerMethod
Create an instance from a bean instance and a method.
-
-
Method Details
-
setArgumentResolvers
Configure the argument resolvers to use for resolving method argument values against aServerWebExchange
. -
getResolvers
Return the configured argument resolvers. -
setParameterNameDiscoverer
Set the ParameterNameDiscoverer for resolving parameter names when needed (for example, default request attribute name).Default is a
DefaultParameterNameDiscoverer
. -
getParameterNameDiscoverer
Return the configured parameter name discoverer. -
setReactiveAdapterRegistry
Configure a reactive adapter registry. This is needed for async return values.By default this is a
ReactiveAdapterRegistry
with default settings. -
invoke
Invoke the method for the given exchange.- Parameters:
message
- the current messageprovidedArgs
- optional list of argument values to match by type- Returns:
- a Mono with the result from the invocation
-