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(java.lang.Object bean,
java.lang.reflect.Method method) |
Modifier and Type | Method and Description |
---|---|
ParameterNameDiscoverer |
getParameterNameDiscoverer()
Return the configured parameter name discoverer.
|
java.util.List<SyncHandlerMethodArgumentResolver> |
getResolvers()
Return the configured argument resolvers.
|
HandlerResult |
invokeForHandlerResult(ServerWebExchange exchange,
BindingContext bindingContext,
java.lang.Object... providedArgs)
Invoke the method for the given exchange.
|
void |
setArgumentResolvers(java.util.List<SyncHandlerMethodArgumentResolver> 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.
|
createWithResolvedBean, equals, getBean, getBeanType, getBridgedMethod, getMethod, getMethodAnnotation, getMethodParameters, getResolvedFromHandlerMethod, getResponseStatus, getResponseStatusReason, getReturnType, getReturnValueType, getShortLogMessage, hashCode, hasMethodAnnotation, isVoid, toString
public SyncInvocableHandlerMethod(HandlerMethod handlerMethod)
public SyncInvocableHandlerMethod(java.lang.Object bean, java.lang.reflect.Method method)
public void setArgumentResolvers(java.util.List<SyncHandlerMethodArgumentResolver> resolvers)
ServerWebExchange
.public java.util.List<SyncHandlerMethodArgumentResolver> getResolvers()
public void setParameterNameDiscoverer(ParameterNameDiscoverer nameDiscoverer)
Default is a DefaultParameterNameDiscoverer
.
public ParameterNameDiscoverer getParameterNameDiscoverer()
@Nullable public HandlerResult invokeForHandlerResult(ServerWebExchange exchange, BindingContext bindingContext, java.lang.Object... providedArgs)
exchange
- the current exchangebindingContext
- the binding context to useprovidedArgs
- optional list of argument values to match by typeHandlerResult
.