| Constructor and Description |
|---|
Cookie(String name,
ISpincastConfig spincastConfig)
Constructor
|
Cookie(String name,
String value,
ISpincastConfig spincastConfig)
Constructor
|
Cookie(String name,
String value,
String path,
String domain,
Date expires,
boolean secure,
boolean httpOnly,
boolean discard,
int version,
ISpincastConfig 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.
|
protected ISpincastConfig |
getSpincastConfig() |
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(Integer 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 Cookie(String name, ISpincastConfig spincastConfig)
public Cookie(String name, String value, ISpincastConfig spincastConfig)
protected ISpincastConfig getSpincastConfig()
public void setValue(String value)
ICookiepublic void setPath(String path)
ICookiepublic String getDomain()
ICookiepublic void setDomain(String domain)
ICookiepublic Date getExpires()
ICookienull the cookie will live for the current session
(this is the default).getExpires in interface ICookiepublic void setExpires(Date expires)
ICookienull the cookie will live for the current session
(this is the default).setExpires in interface ICookiepublic void setExpiresUsingMaxAge(Integer maxAge)
ICookiemaxAge < 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 ICookiepublic boolean isExpired()
ICookiepublic boolean isSecure()
ICookiepublic void setSecure(boolean secure)
ICookiepublic boolean isHttpOnly()
ICookieisHttpOnly in interface ICookiepublic void setHttpOnly(boolean httpOnly)
ICookiesetHttpOnly in interface ICookiepublic boolean isDiscard()
ICookiepublic int getVersion()
ICookiegetVersion in interface ICookieCopyright © 2016. All rights reserved.