| Constructor and Description |
|---|
CookieDefault(String name,
SpincastConfig spincastConfig)
Constructor
|
CookieDefault(String name,
String value,
SpincastConfig spincastConfig)
Constructor
|
CookieDefault(String name,
String value,
String path,
String domain,
Date expires,
boolean secure,
boolean httpOnly,
boolean discard,
int version,
SpincastConfig spincastConfig)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDomain()
Gets the cookie domain.
|
Date |
getExpires()
Gets the date the cookie will expire at.
|
String |
getName()
Gets the cookie name.
|
String |
getPath()
Gets the cookie path.
|
String |
getValue()
Gets the cookie value.
|
int |
getVersion()
Gets the cookie version.
|
boolean |
isDiscard()
Is this cookie to be discarded?
|
boolean |
isExpired()
Is this cookie expired?
|
boolean |
isHttpOnly()
Is the cookie availableto the server
and not to javascript?
|
boolean |
isSecure()
Is the "secure" feature on?
|
void |
setDomain(String domain)
Sets the cookie domain.
|
void |
setExpires(Date expires)
Sets the date the cookie will expire.
|
void |
setExpiresUsingMaxAge(int maxAge)
Sets the number of seconds for a cookie to live.
|
void |
setHttpOnly(boolean httpOnly)
Sets if the cookie is available only for to the server
anbd not to javascript.
|
void |
setPath(String path)
Sets the cookie path.
|
void |
setSecure(boolean secure)
Sets the "secure" feature on or off.
|
void |
setValue(String value)
Sets the cookie value.
|
String |
toString() |
public CookieDefault(String name, SpincastConfig spincastConfig)
public CookieDefault(String name, String value, SpincastConfig spincastConfig)
public void setValue(String value)
Cookiepublic void setPath(String path)
Cookiepublic String getDomain()
Cookiepublic void setDomain(String domain)
Cookiepublic Date getExpires()
Cookienull the cookie will live for the current session
(this is the default).getExpires in interface Cookiepublic void setExpires(Date expires)
Cookienull the cookie will live for the current session
(this is the default).setExpires in interface Cookiepublic void setExpiresUsingMaxAge(int maxAge)
CookiemaxAge < 0 : The "Expires date" will be in the past and the cookie will
therefore be deleted.
If maxAge == 0 : The "Expires date" will be null and the cookie will live
for the session only.
If maxAge > 0 : The "Expires date" will be the current date + 'maxAge' seconds.setExpiresUsingMaxAge in interface Cookiepublic boolean isExpired()
Cookiepublic boolean isSecure()
Cookiepublic void setSecure(boolean secure)
Cookiepublic boolean isHttpOnly()
CookieisHttpOnly in interface Cookiepublic void setHttpOnly(boolean httpOnly)
CookiesetHttpOnly in interface Cookiepublic boolean isDiscard()
Cookiepublic int getVersion()
CookiegetVersion in interface CookieCopyright © 2018. All rights reserved.