Interface Cookie
- All Superinterfaces:
Comparable<Cookie>, Cookie
- All Known Implementing Classes:
DefaultCookie
Deprecated.
An interface defining an
HTTP cookie.
-
Field Summary
Fields inherited from interface Cookie
UNDEFINED_MAX_AGEModifier and TypeFieldDescriptionstatic final longConstant for undefined MaxAge attribute value. -
Method Summary
Modifier and TypeMethodDescriptioncomment()Deprecated.Not part of RFC6265Deprecated.Not part of RFC6265Deprecated.Usecomment()instead.Deprecated.UsecommentUrl()instead.Deprecated.UseCookie.domain()instead.longDeprecated.UsemaxAge()instead.getName()Deprecated.UseCookie.name()instead.getPath()Deprecated.UseCookie.path()instead.getPorts()Deprecated.Useports()instead.getValue()Deprecated.UseCookie.value()instead.intDeprecated.Useversion()instead.booleanDeprecated.Not part of RFC6265longmaxAge()Deprecated.Not part of RFC6265ports()Deprecated.Not part of RFC6265voidsetComment(String comment) Deprecated.Not part of RFC6265voidsetCommentUrl(String commentUrl) Deprecated.Not part of RFC6265voidsetDiscard(boolean discard) Deprecated.Not part of RFC6265voidsetMaxAge(long maxAge) Deprecated.Not part of RFC6265voidsetPorts(int... ports) Deprecated.Not part of RFC6265voidDeprecated.Not part of RFC6265voidsetVersion(int version) Deprecated.Not part of RFC6265intversion()Deprecated.Not part of RFC6265Methods inherited from interface Comparable
compareToMethods inherited from interface Cookie
domain, isHttpOnly, isSecure, name, path, setDomain, setHttpOnly, setPath, setSecure, setValue, setWrap, value, wrapModifier and TypeMethodDescriptiondomain()Returns the domain of thisCookie.booleanChecks to see if thisCookiecan only be accessed via HTTP.booleanisSecure()Checks to see if thisCookieis securename()Returns the name of thisCookie.path()Returns the path of thisCookie.voidSets the domain of thisCookie.voidsetHttpOnly(boolean httpOnly) Determines if thisCookieis HTTP only.voidSets the path of thisCookie.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.value()Returns the value of thisCookie.booleanwrap()Returns true if the raw value of thisCookie, was wrapped with double quotes in original Set-Cookie header.
-
Method Details
-
getName
Deprecated.UseCookie.name()instead. -
getValue
Deprecated.UseCookie.value()instead. -
getDomain
Deprecated.UseCookie.domain()instead. -
getPath
Deprecated.UseCookie.path()instead. -
getComment
Deprecated.Usecomment()instead. -
comment
-
setComment
Deprecated.Not part of RFC6265Sets the comment of thisCookie.- Parameters:
comment- The comment to use
-
getMaxAge
Deprecated.UsemaxAge()instead. -
maxAge
Deprecated.Not part of RFC6265Returns the maximum age of thisCookiein seconds orLong.MIN_VALUEif unspecified -
setMaxAge
Deprecated.Not part of RFC6265Sets the maximum age of thisCookiein seconds. If an age of0is specified, thisCookiewill be automatically removed by browser because it will expire immediately. IfLong.MIN_VALUEis specified, thisCookiewill be removed when the browser is closed. -
getVersion
Deprecated.Useversion()instead. -
version
-
setVersion
Deprecated.Not part of RFC6265Sets the version of thisCookie.- Parameters:
version- The new version to use
-
getCommentUrl
Deprecated.UsecommentUrl()instead. -
commentUrl
-
setCommentUrl
Deprecated.Not part of RFC6265Sets the comment URL of thisCookie.- Parameters:
commentUrl- The comment URL to use
-
isDiscard
-
setDiscard
-
getPorts
Deprecated.Useports()instead. -
ports
-
setPorts
-
setPorts
-
Cookieinstead.