public interface HttpCookie extends Comparable<HttpCookie>
| Modifier and Type | Method and Description |
|---|---|
String |
getDomain()
Returns the domain of this
HttpCookie. |
long |
getMaxAge()
Returns the maximum age of this
HttpCookie in seconds or
Long.MIN_VALUE if unspecified |
String |
getName()
Returns the name of this
HttpCookie. |
String |
getPath()
Returns the path of this
HttpCookie. |
String |
getValue()
Returns the value of this
HttpCookie. |
boolean |
getWrap()
Returns true if the raw value of this
HttpCookie, was wrapped
with double quotes in original Set-Cookie header. |
boolean |
isHttpOnly()
Checks to see if this
HttpCookie can only be accessed via HTTP. |
boolean |
isSecure()
Checks to see if this
HttpCookie is secure |
void |
setDomain(String domain)
Sets the domain of this
HttpCookie. |
void |
setHttpOnly(boolean httpOnly)
Determines if this
HttpCookie is HTTP only. |
void |
setMaxAge(long maxAge)
Sets the maximum age of this
HttpCookie in seconds. |
void |
setPath(String path)
Sets the path of this
HttpCookie. |
void |
setSecure(boolean secure)
Sets the security getStatus of this
HttpCookie |
void |
setValue(String value)
Sets the value of this
HttpCookie. |
void |
setWrap(boolean wrap)
Sets true if the value of this
HttpCookie is to be wrapped with
double quotes. |
compareToString getName()
HttpCookie.HttpCookieString getValue()
HttpCookie.HttpCookievoid setValue(String value)
HttpCookie.value - The value to setboolean getWrap()
HttpCookie, was wrapped
with double quotes in original Set-Cookie header.HttpCookie is to be wrappedvoid setWrap(boolean wrap)
HttpCookie is to be wrapped with
double quotes.wrap - true if wrapString getDomain()
HttpCookie.HttpCookievoid setDomain(String domain)
HttpCookie.domain - The domain to useString getPath()
HttpCookie.HttpCookie's pathvoid setPath(String path)
HttpCookie.path - The path to use for this HttpCookielong getMaxAge()
HttpCookie in seconds or
Long.MIN_VALUE if unspecifiedHttpCookievoid setMaxAge(long maxAge)
HttpCookie in seconds. If an age of
0 is specified, this HttpCookie will be automatically
removed by browser because it will expire immediately. If
Long.MIN_VALUE is specified, this HttpCookie will be
removed when the browser is closed.maxAge - The maximum age of this HttpCookie in secondsboolean isSecure()
HttpCookie is secureHttpCookie is secure, otherwise falsevoid setSecure(boolean secure)
HttpCookiesecure - True if this HttpCookie is to be secure, otherwise
falseboolean isHttpOnly()
HttpCookie can only be accessed via HTTP.
If this returns true, the HttpCookie cannot be accessed through
client side script - But only if the browser supports it. For more
information, please look
hereHttpCookie is HTTP-only or false if it isn'tvoid setHttpOnly(boolean httpOnly)
HttpCookie is HTTP only. If set to true, this
HttpCookie cannot be accessed by a client side script. However,
this works only if the browser supports it. For for information, please
look
here.httpOnly - True if the HttpCookie is HTTP only, otherwise
false.Copyright © 2015–2018 Bridje Framework. All rights reserved.