Package io.micronaut.http.simple.cookies
Class SimpleCookies
java.lang.Object
io.micronaut.http.simple.cookies.SimpleCookies
- All Implemented Interfaces:
io.micronaut.core.convert.ConversionServiceAware,io.micronaut.core.convert.ConversionServiceProvider,io.micronaut.core.convert.value.ConvertibleValues<Cookie>,io.micronaut.core.value.ValueResolver<CharSequence>,Cookies,Iterable<Map.Entry<String,Cookie>>
public class SimpleCookies
extends Object
implements Cookies, io.micronaut.core.convert.ConversionServiceAware
Simple
Cookies implementation.- Since:
- 1.0
-
Field Summary
Fields inherited from interface io.micronaut.core.convert.value.ConvertibleValues
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionSimpleCookies(io.micronaut.core.convert.ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionfindCookie(CharSequence name) Find aCookiefor the given name.<T> Optional<T>get(CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext) <T> Optional<T>get(CharSequence name, Class<T> requiredType) getAll()put(CharSequence name, Cookie cookie) Put a new cookie.voidputAll(Map<CharSequence, Cookie> cookies) Put a set of new cookies.voidsetConversionService(io.micronaut.core.convert.ConversionService conversionService) 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
public SimpleCookies(io.micronaut.core.convert.ConversionService conversionService) - 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
- Specified by:
getin interfaceio.micronaut.core.value.ValueResolver<CharSequence>
-
get
public <T> Optional<T> get(CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext) - Specified by:
getin interfaceio.micronaut.core.value.ValueResolver<CharSequence>
-
values
- Specified by:
valuesin interfaceio.micronaut.core.convert.value.ConvertibleValues<Cookie>
-
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
public void setConversionService(io.micronaut.core.convert.ConversionService conversionService) - Specified by:
setConversionServicein interfaceio.micronaut.core.convert.ConversionServiceAware
-