org.springframework.web.reactive.result.method.annotation

## Class AbstractNamedValueSyncArgumentResolver

- java.lang.Object
- - org.springframework.web.reactive.result.method.HandlerMethodArgumentResolverSupport
  - - org.springframework.web.reactive.result.method.annotation.AbstractNamedValueArgumentResolver
    - - org.springframework.web.reactive.result.method.annotation.AbstractNamedValueSyncArgumentResolver

All Implemented Interfaces:
  HandlerMethodArgumentResolver, SyncHandlerMethodArgumentResolver

Direct Known Subclasses:
  CookieValueMethodArgumentResolver, ExpressionValueMethodArgumentResolver, MatrixVariableMethodArgumentResolver, PathVariableMethodArgumentResolver, RequestAttributeMethodArgumentResolver, RequestHeaderMethodArgumentResolver, RequestParamMethodArgumentResolver

    public abstract class AbstractNamedValueSyncArgumentResolver
    extends AbstractNamedValueArgumentResolver
    implements SyncHandlerMethodArgumentResolver

An extension of `AbstractNamedValueArgumentResolver` for named value resolvers that are synchronous and yet non-blocking. Sub-classes 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.

Since:
  5.0
Author:
  Rossen Stoyanchev

### Nested Class Summary

### Nested classes/interfaces inherited from class org.springframework.web.reactive.result.method.annotation.AbstractNamedValueArgumentResolver

`AbstractNamedValueArgumentResolver.NamedValueInfo`

### Field Summary

### Fields inherited from class org.springframework.web.reactive.result.method.HandlerMethodArgumentResolverSupport

`logger`

### Constructor Summary

Constructors
`protected` `AbstractNamedValueSyncArgumentResolver(org.springframework.beans.factory.config.ConfigurableBeanFactory factory, org.springframework.core.ReactiveAdapterRegistry registry)` Create a new `AbstractNamedValueSyncArgumentResolver`.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`reactor.core.publisher.Mono<Object>` `resolveArgument(org.springframework.core.MethodParameter parameter, BindingContext bindingContext, org.springframework.web.server.ServerWebExchange exchange)` Resolve the value for the method parameter.
`Object` `resolveArgumentValue(org.springframework.core.MethodParameter parameter, BindingContext context, org.springframework.web.server.ServerWebExchange exchange)` Resolve the value for the method parameter synchronously.
`protected reactor.core.publisher.Mono<Object>` `resolveName(String name, org.springframework.core.MethodParameter param, org.springframework.web.server.ServerWebExchange exchange)` Resolve the given parameter type and value name into an argument value.
`protected abstract Object` `resolveNamedValue(String name, org.springframework.core.MethodParameter param, org.springframework.web.server.ServerWebExchange exchange)` Actually resolve the value synchronously.

### Methods inherited from class org.springframework.web.reactive.result.method.annotation.AbstractNamedValueArgumentResolver

`createNamedValueInfo, handleMissingValue, handleMissingValue, handleResolvedValue`

### Methods inherited from class org.springframework.web.reactive.result.method.HandlerMethodArgumentResolverSupport

`checkAnnotatedParamNoReactiveWrapper, checkParameterType, checkParameterTypeNoReactiveWrapper, getAdapterRegistry`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.web.reactive.result.method.HandlerMethodArgumentResolver

`supportsParameter`

### Constructor Detail

#### AbstractNamedValueSyncArgumentResolver

    protected AbstractNamedValueSyncArgumentResolver(@Nullable
                                                     org.springframework.beans.factory.config.ConfigurableBeanFactory factory,
                                                     org.springframework.core.ReactiveAdapterRegistry registry)

Create a new `AbstractNamedValueSyncArgumentResolver`.

Parameters:
  `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 expressions
  `registry` - for checking reactive type wrappers

### Method Detail

#### resolveArgument

    public reactor.core.publisher.Mono<Object> resolveArgument(org.springframework.core.MethodParameter parameter,
                                                               BindingContext bindingContext,
                                                               org.springframework.web.server.ServerWebExchange exchange)

Description copied from interface: `HandlerMethodArgumentResolver`
Resolve the value for the method parameter.

Specified by:
  `resolveArgument` in interface `HandlerMethodArgumentResolver`
Specified by:
  `resolveArgument` in interface `SyncHandlerMethodArgumentResolver`
Overrides:
  `resolveArgument` in class `AbstractNamedValueArgumentResolver`
Parameters:
  `parameter` - the method parameter
  `bindingContext` - the binding context to use
  `exchange` - the current exchange
Returns:
  `Mono` for the argument value, possibly empty

#### resolveArgumentValue

    public Object resolveArgumentValue(org.springframework.core.MethodParameter parameter,
                                       BindingContext context,
                                       org.springframework.web.server.ServerWebExchange exchange)

Description copied from interface: `SyncHandlerMethodArgumentResolver`
Resolve the value for the method parameter synchronously.

Specified by:
  `resolveArgumentValue` in interface `SyncHandlerMethodArgumentResolver`
Parameters:
  `parameter` - the method parameter
  `context` - the binding context to use
  `exchange` - the current exchange
Returns:
  the resolved value, if any

#### resolveName

    protected final reactor.core.publisher.Mono<Object> resolveName(String name,
                                                                    org.springframework.core.MethodParameter param,
                                                                    org.springframework.web.server.ServerWebExchange exchange)

Description copied from class: `AbstractNamedValueArgumentResolver`
Resolve the given parameter type and value name into an argument value.

Specified by:
  `resolveName` in class `AbstractNamedValueArgumentResolver`
Parameters:
  `name` - the name of the value being resolved
  `param` - the method parameter to resolve to an argument value (pre-nested in case of a `Optional` declaration)
  `exchange` - the current exchange
Returns:
  the resolved argument (may be empty `Mono`)

#### resolveNamedValue

    @Nullable
    protected abstract Object resolveNamedValue(String name,
                                                          org.springframework.core.MethodParameter param,
                                                          org.springframework.web.server.ServerWebExchange exchange)

Actually resolve the value synchronously.