public class CookieProvider extends Provider
Provider implementation which saves state via
cookies.| Constructor and Description |
|---|
CookieProvider(String path,
Date expires,
String domain,
boolean secure)
Creates a new cookie provider
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear(String name)
Clears the named value.
|
void |
getValue(String name,
Callback<String,Throwable> callback)
Returns the value asynchronously.
|
void |
set(String name,
String value,
Date expires) |
void |
setValue(String name,
String value)
Sets the value.
|
public CookieProvider(String path, Date expires, String domain, boolean secure)
path - The path for which the cookie is active (defaults to root '/'
which makes it active for all pages in the site)expires - the cookie expiration date (defaults to 7 days from now)domain - The domain to save the cookie for. Note that you cannot
specify a different domain than your page is on, but you can
specify a sub-domain.secure - true if the site is using SSLpublic void clear(String name)
Providerpublic void getValue(String name, Callback<String,Throwable> callback)
Providerpublic void setValue(String name, String value)
ProviderCopyright © 2012. All Rights Reserved.