public class CookieUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CookieUtil.Cookie
An internal representation of Cookie metadata, able to be serialized across cluster nodes (javax.servlet.http.Cookie is not Serializable).
|
| Modifier and Type | Field and Description |
|---|---|
static String |
COOKIE |
static String |
SET_COOKIE |
| Constructor and Description |
|---|
CookieUtil() |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
asExternalFormList(List<CookieUtil.Cookie> cookies)
Converts the specified internal Cookie representations into a list of String representations, ready to be sent over the wire.
|
static String |
coalesceAndExternalizeCookies(List<CookieUtil.Cookie> cookies)
Coalesce the list of specified cookies into a single String representation suitable to be used as part of an HTTP response
|
static String |
coalesceCookies(List<String> cookies)
Coalesce several externalized Cookies into one and returning the resulting concatenated String.
|
static javax.servlet.http.Cookie |
convertFrom(CookieUtil.Cookie cookie)
Converts the specified internal Cookie into a javax.servlet.http.Cookie object.
|
static List<CookieUtil.Cookie> |
extractCookiesFrom(URL remoteAddress,
List<String> cookieValues)
Extract cookies from the specified list of String representation of cookies, validating them to check if they are valid for the domain associated with the specified URL.
|
static List<CookieUtil.Cookie> |
purgeExpiredCookies(List<CookieUtil.Cookie> cookies)
Purges the expired cookies in the specified array.
|
public static final String SET_COOKIE
public static final String COOKIE
public static List<CookieUtil.Cookie> extractCookiesFrom(URL remoteAddress, List<String> cookieValues)
remoteAddress - the address from which the cookies are supposed to be issuedcookieValues - a list of String representation of cookiesCookieUtil.Cookie objects providing the cookie information extracted from the String representationspublic static String coalesceAndExternalizeCookies(List<CookieUtil.Cookie> cookies)
cookies - the cookies to be output to external formpublic static List<String> asExternalFormList(List<CookieUtil.Cookie> cookies)
cookies - the internal Cookies to be output to external formpublic static String coalesceCookies(List<String> cookies)
cookies - the array containing the values of the different externalized Cookies to be coalescedpublic static javax.servlet.http.Cookie convertFrom(CookieUtil.Cookie cookie)
cookie - the internal Cookie to be convertedpublic static List<CookieUtil.Cookie> purgeExpiredCookies(List<CookieUtil.Cookie> cookies)
cookies - the cookies to be purgedCopyright © 2006-2014 GateIn. All Rights Reserved.