public class SessionAttributeMethodArgumentResolver extends AbstractNamedValueArgumentResolver
SessionAttribute
.RequestAttributeMethodArgumentResolver
AbstractNamedValueArgumentResolver.NamedValueInfo
Constructor and Description |
---|
SessionAttributeMethodArgumentResolver(ConfigurableBeanFactory factory,
ReactiveAdapterRegistry registry) |
Modifier and Type | Method and Description |
---|---|
protected AbstractNamedValueArgumentResolver.NamedValueInfo |
createNamedValueInfo(MethodParameter parameter)
Create the
AbstractNamedValueArgumentResolver.NamedValueInfo object for the given method parameter. |
protected void |
handleMissingValue(String name,
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,
MethodParameter parameter,
ServerWebExchange exchange)
Resolve the given parameter type and value name into an argument value.
|
boolean |
supportsParameter(MethodParameter parameter)
Whether this resolver supports the given method parameter.
|
handleMissingValue, handleResolvedValue, resolveArgument
checkAnnotatedParamNoReactiveWrapper, checkParameterType, checkParameterTypeNoReactiveWrapper, getAdapterRegistry
public SessionAttributeMethodArgumentResolver(ConfigurableBeanFactory factory, ReactiveAdapterRegistry registry)
public boolean supportsParameter(MethodParameter parameter)
HandlerMethodArgumentResolver
parameter
- the method parameterprotected AbstractNamedValueArgumentResolver.NamedValueInfo createNamedValueInfo(MethodParameter parameter)
AbstractNamedValueArgumentResolver
AbstractNamedValueArgumentResolver.NamedValueInfo
object for the given method parameter.
Implementations typically retrieve the method annotation by means of
MethodParameter.getParameterAnnotation(Class)
.createNamedValueInfo
in class AbstractNamedValueArgumentResolver
parameter
- the method parameterprotected reactor.core.publisher.Mono<Object> resolveName(String name, MethodParameter parameter, ServerWebExchange exchange)
AbstractNamedValueArgumentResolver
resolveName
in class AbstractNamedValueArgumentResolver
name
- the name of the value being resolvedparameter
- the method parameter to resolve to an argument value
(pre-nested in case of a Optional
declaration)exchange
- the current exchangeMono
)protected void handleMissingValue(String name, MethodParameter parameter)
AbstractNamedValueArgumentResolver
AbstractNamedValueArgumentResolver.resolveName(String, MethodParameter, ServerWebExchange)
returned
null
and there is no default value. Subclasses typically throw an
exception in this case.handleMissingValue
in class AbstractNamedValueArgumentResolver
name
- the name for the valueparameter
- the method parameter