Package com.yahoo.jdisc.http
Class Cookie
- java.lang.Object
-
- com.yahoo.jdisc.http.Cookie
-
public class Cookie extends Object
A RFC 6265 compliant cookie. Note: RFC 2109 and RFC 2965 is no longer supported. All fields that are not part of RFC 6265 are deprecated.- Author:
- Einar M R Rosenvinge, bjorncs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Cookie.SameSite
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object o)
static List<Cookie>
fromCookieHeader(String headerVal)
static Cookie
fromSetCookieHeader(String headerVal)
String
getDomain()
int
getMaxAge(TimeUnit unit)
String
getName()
String
getPath()
Cookie.SameSite
getSameSite()
String
getValue()
int
hashCode()
boolean
isHttpOnly()
boolean
isSecure()
Cookie
setDomain(String domain)
Cookie
setHttpOnly(boolean httpOnly)
Cookie
setMaxAge(int maxAge, TimeUnit unit)
Cookie
setName(String name)
Cookie
setPath(String path)
Cookie
setSameSite(Cookie.SameSite sameSite)
Cookie
setSecure(boolean secure)
Cookie
setValue(String value)
static String
toCookieHeader(Iterable<? extends Cookie> cookies)
static List<String>
toSetCookieHeaderAll(Iterable<? extends Cookie> cookies)
Deprecated.static List<String>
toSetCookieHeaders(Iterable<? extends Cookie> cookies)
String
toString()
-
-
-
Method Detail
-
getName
public String getName()
-
getValue
public String getValue()
-
getDomain
public String getDomain()
-
getPath
public String getPath()
-
getSameSite
public Cookie.SameSite getSameSite()
-
setSameSite
public Cookie setSameSite(Cookie.SameSite sameSite)
-
getMaxAge
public int getMaxAge(TimeUnit unit)
-
isSecure
public boolean isSecure()
-
setSecure
public Cookie setSecure(boolean secure)
-
isHttpOnly
public boolean isHttpOnly()
-
setHttpOnly
public Cookie setHttpOnly(boolean httpOnly)
-
toSetCookieHeaders
public static List<String> toSetCookieHeaders(Iterable<? extends Cookie> cookies)
-
toSetCookieHeaderAll
@Deprecated public static List<String> toSetCookieHeaderAll(Iterable<? extends Cookie> cookies)
Deprecated.
-
-