Package io.micronaut.http.simple.cookies
Class SimpleCookies
java.lang.Object
io.micronaut.http.simple.cookies.SimpleCookies
- All Implemented Interfaces:
ConversionServiceAware,ConversionServiceProvider,ConvertibleValues<Cookie>,ValueResolver<CharSequence>,Cookies,Iterable<Map.Entry<String,Cookie>>
Simple
Cookies implementation.- Since:
- 1.0
- Author:
- Graeme Rocher, Vladimir Orany
-
Field Summary
Fields inherited from interface io.micronaut.core.convert.value.ConvertibleValues
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindCookie(CharSequence name) Find aCookiefor the given name.<T> Optional<T>get(CharSequence name, ArgumentConversionContext<T> conversionContext) Resolve the given property for the given name.<T> Optional<T>get(CharSequence name, Class<T> requiredType) Resolve the given property for the given name.getAll()put(CharSequence name, Cookie cookie) Put a new cookie.voidputAll(Map<CharSequence, Cookie> cookies) Put a set of new cookies.voidsetConversionService(ConversionService conversionService) Sets the conversion service.values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.convert.value.ConvertibleValues
asMap, asMap, asProperties, contains, forEach, getConversionService, getValue, getValueType, isEmpty, iterator, subMap, subMap, subMapMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface io.micronaut.core.value.ValueResolver
get, get
-
Constructor Details
-
SimpleCookies
- Parameters:
conversionService- The conversion service
-
-
Method Details
-
getAll
-
findCookie
Description copied from interface:CookiesFind aCookiefor the given name.- Specified by:
findCookiein interfaceCookies- Parameters:
name- The cookie- Returns:
- An
Optionalcookie
-
get
Description copied from interface:ValueResolverResolve the given property for the given name.- Specified by:
getin interfaceValueResolver<CharSequence>- Type Parameters:
T- The concrete type- Parameters:
name- The namerequiredType- The required type- Returns:
- An optional containing the property value if it exists and is able to be converted
-
get
Description copied from interface:ValueResolverResolve the given property for the given name.- Specified by:
getin interfaceValueResolver<CharSequence>- Type Parameters:
T- The concrete type- Parameters:
name- The nameconversionContext- The conversion context- Returns:
- An optional containing the property value if it exists and is able to be converted
-
values
- Specified by:
valuesin interfaceConvertibleValues<Cookie>- Returns:
- The values
-
put
Put a new cookie.- Parameters:
name- the name of the cookiecookie- the cookie itself- Returns:
- previous value for given name
-
putAll
Put a set of new cookies.- Parameters:
cookies- Map of cookie names and cookies
-
setConversionService
Description copied from interface:ConversionServiceAwareSets the conversion service.- Specified by:
setConversionServicein interfaceConversionServiceAware- Parameters:
conversionService- The conversion service
-