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. 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.
  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
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractNamedValueSyncArgumentResolver(ConfigurableBeanFactory factory, ReactiveAdapterRegistry registry)` Create a new `AbstractNamedValueSyncArgumentResolver`.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    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.

    - ### 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
                                                           ConfigurableBeanFactory factory,
                                                           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(MethodParameter parameter,
                                                                     BindingContext bindingContext,
                                                                     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(MethodParameter parameter,
                                             BindingContext context,
                                             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,
                                                                          MethodParameter param,
                                                                          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,
                                                                MethodParameter param,
                                                                ServerWebExchange exchange)

      Actually resolve the value synchronously.