public abstract class AbstractNamedValueSyncArgumentResolver extends AbstractNamedValueArgumentResolver implements SyncHandlerMethodArgumentResolver
AbstractNamedValueArgumentResolver
for named value
resolvers that are synchronous and yet non-blocking. Subclasses implement
the synchronous resolveNamedValue(java.lang.String, org.springframework.core.MethodParameter, org.springframework.web.server.ServerWebExchange)
to which the asynchronous
resolveName(java.lang.String, org.springframework.core.MethodParameter, org.springframework.web.server.ServerWebExchange)
delegates to by default.AbstractNamedValueArgumentResolver.NamedValueInfo
logger
Modifier | Constructor and Description |
---|---|
protected |
AbstractNamedValueSyncArgumentResolver(ConfigurableBeanFactory factory,
ReactiveAdapterRegistry registry)
Create a new
AbstractNamedValueSyncArgumentResolver . |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Object> |
resolveArgument(MethodParameter parameter,
BindingContext bindingContext,
ServerWebExchange exchange)
Resolve the value for the method parameter.
|
Object |
resolveArgumentValue(MethodParameter parameter,
BindingContext context,
ServerWebExchange exchange)
Resolve the value for the method parameter synchronously.
|
protected reactor.core.publisher.Mono<Object> |
resolveName(String name,
MethodParameter param,
ServerWebExchange exchange)
Resolve the given parameter type and value name into an argument value.
|
protected abstract Object |
resolveNamedValue(String name,
MethodParameter param,
ServerWebExchange exchange)
Actually resolve the value synchronously.
|
createNamedValueInfo, handleMissingValue, handleMissingValue, handleResolvedValue
checkAnnotatedParamNoReactiveWrapper, checkParameterType, checkParameterTypeNoReactiveWrapper, getAdapterRegistry
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
supportsParameter
protected AbstractNamedValueSyncArgumentResolver(@Nullable ConfigurableBeanFactory factory, ReactiveAdapterRegistry registry)
AbstractNamedValueSyncArgumentResolver
.factory
- a bean factory to use for resolving ${...}
placeholder and #{...}
SpEL expressions in default values;
or null
if default values are not expected to have expressionsregistry
- for checking reactive type wrapperspublic reactor.core.publisher.Mono<Object> resolveArgument(MethodParameter parameter, BindingContext bindingContext, ServerWebExchange exchange)
HandlerMethodArgumentResolver
resolveArgument
in interface HandlerMethodArgumentResolver
resolveArgument
in interface SyncHandlerMethodArgumentResolver
resolveArgument
in class AbstractNamedValueArgumentResolver
parameter
- the method parameterbindingContext
- the binding context to useexchange
- the current exchangeMono
for the argument value, possibly emptypublic Object resolveArgumentValue(MethodParameter parameter, BindingContext context, ServerWebExchange exchange)
SyncHandlerMethodArgumentResolver
resolveArgumentValue
in interface SyncHandlerMethodArgumentResolver
parameter
- the method parametercontext
- the binding context to useexchange
- the current exchangeprotected final reactor.core.publisher.Mono<Object> resolveName(String name, MethodParameter param, ServerWebExchange exchange)
AbstractNamedValueArgumentResolver
resolveName
in class AbstractNamedValueArgumentResolver
name
- the name of the value being resolvedparam
- the method parameter to resolve to an argument value
(pre-nested in case of a Optional
declaration)exchange
- the current exchangeMono
)@Nullable protected abstract Object resolveNamedValue(String name, MethodParameter param, ServerWebExchange exchange)