public final class SetCookie extends Object
| Constructor and Description |
|---|
SetCookie() |
| Modifier and Type | Method and Description |
|---|---|
SetCookie |
domain(String domain)
Sets the domain
|
boolean |
equals(Object o)
Two
SetCookie objects are equal if their toString() representations are equal |
SetCookie |
expired()
Expires the cookie
|
SetCookie |
expiresAt(Instant expiresAt)
Sets the cookie's expiresAt value, overriding any set previously via
expiresAtRawStr(String). |
SetCookie |
expiresAtRawStr(String expiresAtRawStr)
Sets the cookie's expiresAt value to the specified raw date/time string.
|
String |
getDomain()
Retrieves the domain
|
String |
getName()
Retrieves the Name
|
String |
getPath()
Retrieves the path
|
String |
getSameSite()
Retrieves the SameSite cookie attribute value
|
String |
getValue()
Retrieves the value
|
int |
hashCode() |
SetCookie |
httpOnly()
Sets the HttpOnly flag to true
|
SetCookie |
httpOnly(boolean httpOnly)
Sets the HttpOnly flag
|
boolean |
isHttpOnly()
Retrieves the HttpOnly flag
|
boolean |
isSecure()
Retrieves the Secure flag
|
SetCookie |
maxAge(long duration,
TimeUnit unit)
Sets the cookie's MaxAge
The duration value has second granularity
|
SetCookie |
name(String name)
Sets the Name
|
SetCookie |
path(String path)
Sets the path
|
SetCookie |
sameSite(String sameSite)
Sets the SameSite cookie attribute value
|
SetCookie |
secure()
Sets the Secure flag to true
|
SetCookie |
secure(boolean secure)
Sets the Secure flag
|
HeaderField |
toHeaderField()
Method to convert this to a HeaderField.
|
String |
toString() |
SetCookie |
value(String value)
Sets the value
|
public String getName()
public SetCookie name(String name)
name - the nameSetCookie instancepublic String getValue()
public SetCookie value(String value)
value - the valueSetCookie instancepublic String getPath()
public SetCookie path(String path)
path - the pathSetCookie instancepublic String getDomain()
public SetCookie domain(String domain)
domain - the domainSetCookie instancepublic String getSameSite()
public SetCookie sameSite(String sameSite)
sameSite - the SameSite valueSetCookie instancepublic SetCookie httpOnly(boolean httpOnly)
httpOnly - the HttpOnly flagSetCookie instancepublic boolean isHttpOnly()
public SetCookie httpOnly()
SetCookie instancepublic SetCookie secure(boolean secure)
secure - true if secureSetCookie instancepublic boolean isSecure()
public SetCookie maxAge(long duration, TimeUnit unit)
public SetCookie expiresAt(Instant expiresAt)
expiresAtRawStr(String).expiresAt - the time when cookie expiresSetCookie instancepublic SetCookie expiresAtRawStr(String expiresAtRawStr)
expiresAt(Instant).expiresAtRawStr - the time when cookie expiresSetCookie instancepublic boolean equals(Object o)
SetCookie objects are equal if their toString() representations are equalpublic HeaderField toHeaderField()
SetCookie converted into a HeaderFieldCopyright 2023 Ping Identity Corp. All rights reserved.