public interface Cookie
| Modifier and Type | Field and Description |
|---|---|
static String |
DOMAIN_ATTR |
static String |
EXPIRES_ATTR |
static String |
MAX_AGE_ATTR |
static String |
PATH_ATTR |
static String |
SECURE_ATTR |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAttribute(String name) |
String |
getAttribute(String name) |
Date |
getCreationDate()
Returns creation time of the cookie.
|
String |
getDomain()
Returns domain attribute of the cookie.
|
Date |
getExpiryDate()
Returns the expiration
Date of the cookie, or null
if none exists. |
String |
getName()
Returns the name.
|
String |
getPath()
Returns the path attribute of the cookie.
|
String |
getValue()
Returns the value.
|
boolean |
isExpired(Date date)
Returns true if this cookie has expired.
|
boolean |
isPersistent()
Returns
false if the cookie should be discarded at the end
of the "session"; true otherwise. |
boolean |
isSecure()
Indicates whether this cookie requires a secure connection.
|
static final String PATH_ATTR
static final String DOMAIN_ATTR
static final String MAX_AGE_ATTR
static final String SECURE_ATTR
static final String EXPIRES_ATTR
boolean containsAttribute(String name)
String getName()
String getValue()
Date getExpiryDate()
Date of the cookie, or null
if none exists.
Note: the object returned by this method is considered immutable. Changing it (e.g. using setTime()) could result in undefined behaviour. Do so at your peril.
Date, or null.boolean isPersistent()
false if the cookie should be discarded at the end
of the "session"; true otherwise.false if the cookie should be discarded at the end
of the "session"; true otherwiseString getDomain()
String getPath()
boolean isSecure()
true if this cookie should only be sent
over secure connections, false otherwise.boolean isExpired(Date date)
date - Current timetrue if the cookie has expired.Date getCreationDate()
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.