Package io.undertow.server.handlers
Class CookieImpl
java.lang.Object
io.undertow.server.handlers.CookieImpl
- All Implemented Interfaces:
Cookie,Comparable
- Author:
- Stuart Douglas, Richard Opalka
-
Field Summary
Fields inherited from interface io.undertow.server.handlers.Cookie
COOKIE_COMMENT_ATTR, COOKIE_DISCARD_ATTR, COOKIE_DOMAIN_ATTR, COOKIE_EXPIRES_ATTR, COOKIE_HTTP_ONLY_ATTR, COOKIE_MAX_AGE_ATTR, COOKIE_PATH_ATTR, COOKIE_SAME_SITE_ATTR, COOKIE_SECURE_ATTR -
Constructor Summary
ConstructorsConstructorDescriptionCookieImpl(String name) CookieImpl(String name, String value) CookieImpl(String name, String value, Cookie cookiePrimer) -
Method Summary
Modifier and TypeMethodDescriptionfinal intfinal booleangetAttribute(String name) Returns the attribute associated with the name ornullif no attribute is associated with the name.Returns an unmodifiable map of the attributes associated with this cookie.getName()getPath()getValue()intfinal inthashCode()booleanbooleanbooleanbooleanisSecure()setAttribute(String name, String value) Sets an attribute for the cookie.protected CookiesetAttribute(String name, String value, boolean performSync) setComment(String comment) setDiscard(boolean discard) setExpires(Date expires) setHttpOnly(boolean httpOnly) setSameSite(boolean sameSite) setSameSiteMode(String mode) setSecure(boolean secure) setVersion(int version) final StringtoString()
-
Constructor Details
-
CookieImpl
-
CookieImpl
-
CookieImpl
-
-
Method Details
-
getName
-
getValue
-
setValue
-
getPath
-
setPath
-
getDomain
-
setDomain
-
getMaxAge
-
setMaxAge
-
isDiscard
public boolean isDiscard() -
setDiscard
- Specified by:
setDiscardin interfaceCookie
-
isSecure
public boolean isSecure() -
setSecure
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceCookie
-
setVersion
- Specified by:
setVersionin interfaceCookie
-
isHttpOnly
public boolean isHttpOnly()- Specified by:
isHttpOnlyin interfaceCookie
-
setHttpOnly
- Specified by:
setHttpOnlyin interfaceCookie
-
getExpires
- Specified by:
getExpiresin interfaceCookie
-
setExpires
- Specified by:
setExpiresin interfaceCookie
-
getComment
- Specified by:
getCommentin interfaceCookie
-
setComment
- Specified by:
setCommentin interfaceCookie
-
isSameSite
public boolean isSameSite()- Specified by:
isSameSitein interfaceCookie
-
setSameSite
- Specified by:
setSameSitein interfaceCookie
-
getSameSiteMode
- Specified by:
getSameSiteModein interfaceCookie
-
setSameSiteMode
- Specified by:
setSameSiteModein interfaceCookie
-
getAttribute
Description copied from interface:CookieReturns the attribute associated with the name ornullif no attribute is associated with the name.- Specified by:
getAttributein interfaceCookie- Parameters:
name- the name of the attribute- Returns:
- the value or
nullif not found
-
setAttribute
Description copied from interface:CookieSets an attribute for the cookie. If the value isnull, the attribute is removed. If the value is notnull, the attribute is added to the attributes for this cookie. If name match pre-existing attribute, like "Cookie.COOKIE_PATH_ATTR" it will override that value- Specified by:
setAttributein interfaceCookie- Parameters:
name- the name of the attributevalue- the value of the attribute ornullto remove it- Returns:
- this cookie
-
setAttribute
-
getAttributes
Description copied from interface:CookieReturns an unmodifiable map of the attributes associated with this cookie.- Specified by:
getAttributesin interfaceCookie- Returns:
- an unmodifiable map of the attributes
-
hashCode
public final int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable- Specified by:
compareToin interfaceCookie
-
toString
-