Class DefaultCookie
java.lang.Object
io.netty.handler.codec.http.cookie.DefaultCookie
io.netty.handler.codec.http.DefaultCookie
- All Implemented Interfaces:
Cookie, Cookie, Comparable<Cookie>
Deprecated.
The default
Cookie implementation.-
Field Summary
Fields inherited from interface Cookie
UNDEFINED_MAX_AGEModifier and TypeFieldDescriptionstatic final longConstant for undefined MaxAge attribute value. -
Constructor Summary
ConstructorsConstructorDescriptionDefaultCookie(String name, String value) Deprecated.Creates a new cookie with the specified name and value. -
Method Summary
Modifier and TypeMethodDescriptioncomment()Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.longDeprecated.getName()Deprecated.getPath()Deprecated.getPorts()Deprecated.getValue()Deprecated.intDeprecated.booleanDeprecated.ports()Deprecated.voidsetComment(String comment) Deprecated.voidsetCommentUrl(String commentUrl) Deprecated.voidsetDiscard(boolean discard) Deprecated.voidsetPorts(int... ports) Deprecated.voidDeprecated.voidsetVersion(int version) Deprecated.intversion()Deprecated.Methods inherited from class DefaultCookie
compareTo, domain, equals, hashCode, isHttpOnly, isPartitioned, isSecure, maxAge, name, path, sameSite, setDomain, setHttpOnly, setMaxAge, setPartitioned, setPath, setSameSite, setSecure, setValue, setWrap, toString, validateValue, value, wrapModifier and TypeMethodDescriptionintdomain()Returns the domain of thisCookie.booleaninthashCode()booleanChecks to see if thisCookiecan only be accessed via HTTP.booleanChecks to see if thisCookieis partitionedbooleanisSecure()Checks to see if thisCookieis securelongmaxAge()Returns the maximum age of thisCookiein seconds orCookie.UNDEFINED_MAX_AGEif unspecifiedname()Returns the name of thisCookie.path()Returns the path of thisCookie.sameSite()Checks to see if thisCookiecan be sent along cross-site requests.voidSets the domain of thisCookie.voidsetHttpOnly(boolean httpOnly) Determines if thisCookieis HTTP only.voidsetMaxAge(long maxAge) Sets the maximum age of thisCookiein seconds.voidsetPartitioned(boolean partitioned) Sets thePartitionedattribute of thisCookievoidSets the path of thisCookie.voidsetSameSite(CookieHeaderNames.SameSite sameSite) Determines if this thisCookiecan be sent along cross-site requests.voidsetSecure(boolean secure) Sets the security getStatus of thisCookievoidSets the value of thisCookie.voidsetWrap(boolean wrap) Sets true if the value of thisCookieis to be wrapped with double quotes.toString()protected StringvalidateValue(String name, String value) Deprecated.CookieUtil is package private, will be removed once old Cookie API is droppedvalue()Returns the value of thisCookie.booleanwrap()Returns true if the raw value of thisCookie, was wrapped with double quotes in original Set-Cookie header.
-
Constructor Details
-
DefaultCookie
-
-
Method Details
-
getName
-
getValue
-
getDomain
-
getPath
-
getComment
-
comment
-
setComment
Deprecated.Description copied from interface:CookieSets the comment of thisCookie.- Specified by:
setCommentin interfaceCookie- Parameters:
comment- The comment to use
-
getCommentUrl
Deprecated.- Specified by:
getCommentUrlin interfaceCookie
-
commentUrl
Deprecated.Description copied from interface:CookieReturns the comment URL of thisCookie.- Specified by:
commentUrlin interfaceCookie- Returns:
- The comment URL of this
Cookie
-
setCommentUrl
Deprecated.Description copied from interface:CookieSets the comment URL of thisCookie.- Specified by:
setCommentUrlin interfaceCookie- Parameters:
commentUrl- The comment URL to use
-
isDiscard
-
setDiscard
-
getPorts
-
ports
-
setPorts
-
setPorts
-
getMaxAge
-
getVersion
-
version
-
setVersion
Deprecated.Description copied from interface:CookieSets the version of thisCookie.- Specified by:
setVersionin interfaceCookie- Parameters:
version- The new version to use
-
DefaultCookieinstead.