Class CookieValueArgumentResolver
java.lang.Object
org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
org.springframework.web.service.invoker.CookieValueArgumentResolver
- All Implemented Interfaces:
HttpServiceArgumentResolver
HttpServiceArgumentResolver
for @CookieValue
annotated arguments.
The argument may be:
Map<String, ?>
orMultiValueMap<String, ?>
with multiple cookies and value(s).Collection
or an array of cookie values.- An individual cookie value.
Individual cookie values may be Strings or Objects to be converted to
String values through the configured ConversionService
.
If the value is required but null
, IllegalArgumentException
is raised. The value is not required if:
CookieValue.required()
is set tofalse
CookieValue.defaultValue()
provides a fallback value- The argument is declared as
Optional
- Since:
- 6.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
AbstractNamedValueArgumentResolver.NamedValueInfo
-
Field Summary
Fields inherited from class org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addRequestValue
(String name, String value, HttpRequestValues.Builder requestValues) Add the given, single request value.createNamedValueInfo
(MethodParameter parameter) Return information about the request value, ornull
if the parameter does not represent a request value of interest.Methods inherited from class org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
getConversionService, resolve
-
Constructor Details
-
CookieValueArgumentResolver
-
-
Method Details
-
createNamedValueInfo
protected AbstractNamedValueArgumentResolver.NamedValueInfo createNamedValueInfo(MethodParameter parameter) Description copied from class:AbstractNamedValueArgumentResolver
Return information about the request value, ornull
if the parameter does not represent a request value of interest.- Specified by:
createNamedValueInfo
in classAbstractNamedValueArgumentResolver
-
addRequestValue
Description copied from class:AbstractNamedValueArgumentResolver
Add the given, single request value. This may be called multiples times if the request value is multivalued.- Specified by:
addRequestValue
in classAbstractNamedValueArgumentResolver
- Parameters:
name
- the request value namevalue
- the valuerequestValues
- builder to add the request value to
-