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

## Class SessionAttributeMethodArgumentResolver

- 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.SessionAttributeMethodArgumentResolver

All Implemented Interfaces:
  HandlerMethodArgumentResolver

    public class SessionAttributeMethodArgumentResolver
    extends AbstractNamedValueArgumentResolver

Resolves method arguments annotated with an @`SessionAttribute`.

Since:
  5.0
Author:
  Rossen Stoyanchev
See Also:
  `RequestAttributeMethodArgumentResolver`

### 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
Constructor and Description
`SessionAttributeMethodArgumentResolver(org.springframework.beans.factory.config.ConfigurableBeanFactory factory, org.springframework.core.ReactiveAdapterRegistry registry)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected AbstractNamedValueArgumentResolver.NamedValueInfo` `createNamedValueInfo(org.springframework.core.MethodParameter parameter)` Create the `AbstractNamedValueArgumentResolver.NamedValueInfo` object for the given method parameter.
`protected void` `handleMissingValue(String name, org.springframework.core.MethodParameter parameter)` Invoked when a named value is required, but `AbstractNamedValueArgumentResolver.resolveName(String, MethodParameter, ServerWebExchange)` returned `null` and there is no default value.
`protected reactor.core.publisher.Mono<Object>` `resolveName(String name, org.springframework.core.MethodParameter parameter, org.springframework.web.server.ServerWebExchange exchange)` Resolve the given parameter type and value name into an argument value.
`boolean` `supportsParameter(org.springframework.core.MethodParameter parameter)` Whether this resolver supports the given method parameter.

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

`handleMissingValue, handleResolvedValue, resolveArgument`

### 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`

### Constructor Detail

#### SessionAttributeMethodArgumentResolver

    public SessionAttributeMethodArgumentResolver(org.springframework.beans.factory.config.ConfigurableBeanFactory factory,
                                                  org.springframework.core.ReactiveAdapterRegistry registry)

### Method Detail

#### supportsParameter

    public boolean supportsParameter(org.springframework.core.MethodParameter parameter)

Description copied from interface: `HandlerMethodArgumentResolver`
Whether this resolver supports the given method parameter.

Parameters:
  `parameter` - the method parameter

#### createNamedValueInfo

    protected AbstractNamedValueArgumentResolver.NamedValueInfo createNamedValueInfo(org.springframework.core.MethodParameter parameter)

Description copied from class: `AbstractNamedValueArgumentResolver`
Create the `AbstractNamedValueArgumentResolver.NamedValueInfo` object for the given method parameter. Implementations typically retrieve the method annotation by means of `MethodParameter.getParameterAnnotation(Class)`.

Specified by:
  `createNamedValueInfo` in class `AbstractNamedValueArgumentResolver`
Parameters:
  `parameter` - the method parameter
Returns:
  the named value information

#### resolveName

    protected reactor.core.publisher.Mono<Object> resolveName(String name,
                                                              org.springframework.core.MethodParameter parameter,
                                                              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
  `parameter` - 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`)

#### handleMissingValue

    protected void handleMissingValue(String name,
                                      org.springframework.core.MethodParameter parameter)

Description copied from class: `AbstractNamedValueArgumentResolver`
Invoked when a named value is required, but `AbstractNamedValueArgumentResolver.resolveName(String, MethodParameter, ServerWebExchange)` returned `null` and there is no default value. Subclasses typically throw an exception in this case.

Overrides:
  `handleMissingValue` in class `AbstractNamedValueArgumentResolver`
Parameters:
  `name` - the name for the value
  `parameter` - the method parameter