public class XPFHttpCookie extends Object
| Constructor and Description |
|---|
XPFHttpCookie(String comment,
String domain,
int maxAge,
String name,
String path,
boolean secure,
boolean httpOnly,
String value,
int version) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getComment()
Returns the comment describing the purpose of this cookie, or
null if the cookie has no comment. |
String |
getDomain()
Gets the domain name of this Cookie.
|
int |
getMaxAge()
Gets the maximum age in seconds of this Cookie.
|
String |
getName()
Returns the name of the cookie.
|
String |
getPath()
Returns the path on the server
to which the browser returns this cookie.
|
String |
getValue()
Gets the current value of this Cookie.
|
int |
getVersion()
Returns the version of the protocol this cookie complies
with.
|
int |
hashCode() |
boolean |
isHttpOnly()
Marks or unmarks this Cookie as HttpOnly.
|
boolean |
isSecure()
Returns
true if the browser is sending cookies
only over a secure protocol, or false if the
browser can send cookies using any protocol. |
String |
toString() |
protected boolean canEqual(Object other)
public String getComment()
null if the cookie has no comment.null if unspecifiedpublic String getDomain()
Domain names are formatted according to RFC 2109.
public int getMaxAge()
By default, -1 is returned, which indicates that
the cookie will persist until browser shutdown.
public String getName()
public String getPath()
String specifying a path that contains
a servlet name, for example, /catalogpublic boolean isSecure()
true if the browser is sending cookies
only over a secure protocol, or false if the
browser can send cookies using any protocol.true if the browser uses a secure protocol,
false otherwisepublic boolean isHttpOnly()
If isHttpOnly is set to true, this cookie is marked as HttpOnly, by adding the HttpOnly attribute to it.
HttpOnly cookies are not supposed to be exposed to client-side scripting code, and may therefore help mitigate certain kinds of cross-site scripting attacks.
public String getValue()
public int getVersion()
Copyright © 2025. All rights reserved.