|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.teamdev.jxbrowser.cookies.Cookie
public class Cookie
Represents a Cookie object.
Constructor Summary | |
---|---|
Cookie()
Constructs empty Cookie object. |
|
Cookie(java.lang.String domain,
java.lang.String domainsPath,
java.lang.String name,
java.lang.String value,
boolean secure,
boolean httpOnly,
boolean session,
long expiry)
Constructs a new Cookie object with the given data. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getDomain()
Returns the host or domain for which the cookie is set. |
java.lang.String |
getDomainsPath()
Returns the path within the domain for which the cookie is valid. |
long |
getExpiry()
Returns cookies expiration time in seconds. |
java.lang.String |
getName()
Returns the cookie name. |
java.lang.String |
getValue()
Returns string that represents cookie value. |
int |
hashCode()
|
java.lang.Boolean |
isHttpOnly()
|
boolean |
isSecure()
Returns true if cookie should only be sent over a
secure connection. |
java.lang.Boolean |
isSession()
Returns true if the cookie it's a session cookie. |
void |
setDomain(java.lang.String domain)
Sets a new cookie domain. |
void |
setDomainsPath(java.lang.String domainsPath)
Sets the cookie domain path. |
void |
setExpiry(long expiry)
Sets expiration time in seconds. |
void |
setHttpOnly(boolean httpOnly)
Set the cookie http only status. |
void |
setName(java.lang.String name)
Sets a new name for cookie. |
void |
setSecure(boolean secure)
Sets the cookie secure flag that indicates that cookie should only be sent over a secure connection. |
void |
setSession(boolean session)
Set whether cookie stored by session |
void |
setValue(java.lang.String value)
Sets value for the cookie. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cookie()
public Cookie(java.lang.String domain, java.lang.String domainsPath, java.lang.String name, java.lang.String value, boolean secure, boolean httpOnly, boolean session, long expiry)
domain
- the host or domain for which the cookie is set. presence of a
leading dot indicates a domain cookie; otherwise, the cookie
is treated as a non-domain cookie. see RFC2109.domainsPath
- path within the domain for which the cookie is validname
- cookie namevalue
- cookie datasecure
- true if the cookie should only be sent over a secure
connection.httpOnly
- true if the cookie should only be sent to, and can only be
modified by, an http connection.session
- true if the cookie should exist for the current session only.
see expiry.expiry
- expiration date, in seconds since midnight (00:00:00), January
1, 1970 UTC. note that expiry time will also be honored for
session cookies; in this way, the more restrictive of the two
will take effect.Method Detail |
---|
public java.lang.String getDomain()
public void setDomain(java.lang.String domain)
domain
- a new cookie domainpublic java.lang.String getDomainsPath()
public void setDomainsPath(java.lang.String domainsPath)
domainsPath
- the cookie domain pathpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the name of cookiepublic java.lang.String getValue()
public void setValue(java.lang.String value)
value
- the cookie valuepublic boolean isSecure()
true
if cookie should only be sent over a
secure connection.
true
if cookie should only be sent over a
secure connectionpublic void setSecure(boolean secure)
secure
- true
if cookie should only be sent over a
secure connectionpublic java.lang.Boolean isHttpOnly()
public void setHttpOnly(boolean httpOnly)
httpOnly
- whether http only statuspublic java.lang.Boolean isSession()
true
if the cookie it's a session cookie.
true
if the cookie it's a session cookiepublic void setSession(boolean session)
session
- whether cookie stored by sessionpublic long getExpiry()
public void setExpiry(long expiry)
expiry
- the expiration timepublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |