public interface CookiesRequestContextAddon<R extends RequestContext<?>>
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(Cookie cookie)
Adds a cookie.
|
void |
addCookie(String name,
String value)
Adds a cookie using the specified name and value.
|
void |
addCookie(String name,
String value,
String path,
String domain,
Date expires,
boolean secure,
boolean httpOnly,
boolean discard,
int version)
Adds a cookie, using all available configurations.
|
Cookie |
createCookie(String name)
Creates a cookie.
|
void |
deleteAllCookies()
Deletes all cookies.
|
void |
deleteCookie(String name)
Deletes a cookie.
|
Cookie |
getCookie(String name)
Gets a cookie.
|
Map<String,Cookie> |
getCookies()
Gets the current cookies in a Map, using their names as the keys.
|
boolean |
isCookiesEnabledValidated()
Did we validate that the current user has
cookies enabled?
|
void |
resetCookies()
Resets the current cookies to the original ones
of the request.
|
Map<String,Cookie> getCookies()
void addCookie(Cookie cookie)
Cookie createCookie(String name)
addCookie(Cookie) if you want to
send it.
By default, the public host (SpincastConfig.getPublicServerHost())
is uses as the cookie's domain
and the cookie is valid for the time
of the session only.
void addCookie(String name, String value)
By default, the public host (SpincastConfig.getPublicServerHost())
is uses as the cookie's domain
and the cookie is valid for the time
of the session only.
void addCookie(String name, String value, String path, String domain, Date expires, boolean secure, boolean httpOnly, boolean discard, int version)
void deleteCookie(String name)
expires date in the
past so the user's browser will remove it.
isExpired() will return true after you called
this method.void deleteAllCookies()
expires date in the
past so the user's browser will remove them.void resetCookies()
boolean isCookiesEnabledValidated()
Copyright © 2017. All rights reserved.