Package org.eclipse.jetty.http
Class HttpCookie.Wrapper
java.lang.Object
org.eclipse.jetty.http.HttpCookie.Wrapper
- All Implemented Interfaces:
HttpCookie
- Enclosing interface:
- HttpCookie
A wrapper for HttpCookie
instances.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.http.HttpCookie
HttpCookie.Builder, HttpCookie.Immutable, HttpCookie.JavaNetHttpCookie, HttpCookie.SameSite, HttpCookie.Wrapper
-
Field Summary
Fields inherited from interface org.eclipse.jetty.http.HttpCookie
COMMENT_ATTRIBUTE, DOMAIN_ATTRIBUTE, EXPIRES_ATTRIBUTE, HTTP_ONLY_ATTRIBUTE, MAX_AGE_ATTRIBUTE, PARTITIONED_ATTRIBUTE, PATH_ATTRIBUTE, SAME_SITE_ATTRIBUTE, SECURE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Equivalent togetAttributes().get(COMMENT_ATTRIBUTE)
.Equivalent togetAttributes().get(DOMAIN_ATTRIBUTE)
.long
getName()
getPath()
Equivalent togetAttributes().get(PATH_ATTRIBUTE)
.getValue()
int
int
hashCode()
boolean
boolean
boolean
boolean
isSecure()
toString()
-
Constructor Details
-
Wrapper
-
-
Method Details
-
getWrapped
-
getName
- Specified by:
getName
in interfaceHttpCookie
- Returns:
- the cookie name
-
getValue
- Specified by:
getValue
in interfaceHttpCookie
- Returns:
- the cookie value
-
getVersion
public int getVersion()- Specified by:
getVersion
in interfaceHttpCookie
- Returns:
- the value of the
Version
attribute
-
getAttributes
- Specified by:
getAttributes
in interfaceHttpCookie
- Returns:
- the attributes associated with this cookie
-
getExpires
- Specified by:
getExpires
in interfaceHttpCookie
- Returns:
- the value of the
Expires
attribute, ornull
if not present - See Also:
-
getMaxAge
public long getMaxAge()- Specified by:
getMaxAge
in interfaceHttpCookie
- Returns:
- the value of the
Max-Age
attribute, in seconds, or-1
if not present - See Also:
-
isExpired
public boolean isExpired()- Specified by:
isExpired
in interfaceHttpCookie
- Returns:
- whether the cookie is expired
-
getComment
Description copied from interface:HttpCookie
Equivalent to
getAttributes().get(COMMENT_ATTRIBUTE)
.- Specified by:
getComment
in interfaceHttpCookie
- Returns:
- the value of the
Comment
attribute - See Also:
-
getDomain
Description copied from interface:HttpCookie
Equivalent to
getAttributes().get(DOMAIN_ATTRIBUTE)
.- Specified by:
getDomain
in interfaceHttpCookie
- Returns:
- the value of the
Domain
attribute - See Also:
-
getPath
Description copied from interface:HttpCookie
Equivalent to
getAttributes().get(PATH_ATTRIBUTE)
.- Specified by:
getPath
in interfaceHttpCookie
- Returns:
- the value of the
Path
attribute - See Also:
-
isSecure
public boolean isSecure()- Specified by:
isSecure
in interfaceHttpCookie
- Returns:
- whether the
Secure
attribute is present - See Also:
-
getSameSite
- Specified by:
getSameSite
in interfaceHttpCookie
- Returns:
- the value of the
SameSite
attribute - See Also:
-
isHttpOnly
public boolean isHttpOnly()- Specified by:
isHttpOnly
in interfaceHttpCookie
- Returns:
- whether the
HttpOnly
attribute is present - See Also:
-
isPartitioned
public boolean isPartitioned()- Specified by:
isPartitioned
in interfaceHttpCookie
- Returns:
- whether the
Partitioned
attribute is present - See Also:
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceHttpCookie
- Overrides:
hashCode
in classObject
- Returns:
- the cookie hash code
- See Also:
-
equals
- Specified by:
equals
in interfaceHttpCookie
- Overrides:
equals
in classObject
- Parameters:
obj
- the object to test for equality- Returns:
- whether this cookie is equal to the given object
- See Also:
-
toString
-