public class SyncInvocableHandlerMethod extends HandlerMethod
HandlerMethod
that invokes the underlying method via
InvocableHandlerMethod
but uses sync argument resolvers only and
thus can return directly a HandlerResult
with no async wrappers.HandlerMethod.HandlerMethodParameter
logger
Constructor and Description |
---|
SyncInvocableHandlerMethod(HandlerMethod handlerMethod) |
SyncInvocableHandlerMethod(Object bean,
Method method) |
Modifier and Type | Method and Description |
---|---|
ParameterNameDiscoverer |
getParameterNameDiscoverer()
Return the configured parameter name discoverer.
|
List<SyncHandlerMethodArgumentResolver> |
getResolvers()
Return the configured argument resolvers.
|
HandlerResult |
invokeForHandlerResult(ServerWebExchange exchange,
BindingContext bindingContext,
Object... providedArgs)
Invoke the method for the given exchange.
|
void |
setArgumentResolvers(List<SyncHandlerMethodArgumentResolver> resolvers)
Configure the argument resolvers 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.
|
assertTargetBean, createWithResolvedBean, equals, findProvidedArgument, formatArgumentError, formatInvokeError, getBean, getBeanType, getBridgedMethod, getMethod, getMethodAnnotation, getMethodParameters, getResolvedFromHandlerMethod, getResponseStatus, getResponseStatusReason, getReturnType, getReturnValueType, getShortLogMessage, hashCode, hasMethodAnnotation, isVoid, toString
public SyncInvocableHandlerMethod(HandlerMethod handlerMethod)
public void setArgumentResolvers(List<SyncHandlerMethodArgumentResolver> resolvers)
ServerWebExchange
.public List<SyncHandlerMethodArgumentResolver> getResolvers()
public void setParameterNameDiscoverer(ParameterNameDiscoverer nameDiscoverer)
Default is a DefaultParameterNameDiscoverer
.
public ParameterNameDiscoverer getParameterNameDiscoverer()
@Nullable public HandlerResult invokeForHandlerResult(ServerWebExchange exchange, BindingContext bindingContext, Object... providedArgs)
exchange
- the current exchangebindingContext
- the binding context to useprovidedArgs
- optional list of argument values to match by typeHandlerResult
.ServerErrorException
- if method argument resolution or method invocation fails