Package org.eclipse.jetty.http
Class HttpCookie
- java.lang.Object
-
- org.eclipse.jetty.http.HttpCookie
-
public class HttpCookie extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpCookie(String name, String value)HttpCookie(String name, String value, long maxAge)HttpCookie(String name, String value, String domain, String path)HttpCookie(String name, String value, String domain, String path, long maxAge, boolean httpOnly, boolean secure)HttpCookie(String name, String value, String domain, String path, long maxAge, boolean httpOnly, boolean secure, String comment, int version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasString()StringgetComment()StringgetDomain()longgetMaxAge()StringgetName()StringgetPath()StringgetValue()intgetVersion()booleanisExpired(long timeNanos)booleanisHttpOnly()booleanisSecure()
-
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the cookie name
-
getValue
public String getValue()
- Returns:
- the cookie value
-
getComment
public String getComment()
- Returns:
- the cookie comment
-
getDomain
public String getDomain()
- Returns:
- the cookie domain
-
getMaxAge
public long getMaxAge()
- Returns:
- the cookie max age in seconds
-
getPath
public String getPath()
- Returns:
- the cookie path
-
isSecure
public boolean isSecure()
- Returns:
- whether the cookie is valid for secure domains
-
getVersion
public int getVersion()
- Returns:
- the cookie version
-
isHttpOnly
public boolean isHttpOnly()
- Returns:
- whether the cookie is valid for the http protocol only
-
isExpired
public boolean isExpired(long timeNanos)
- Parameters:
timeNanos- the time to check for cookie expiration, in nanoseconds- Returns:
- whether the cookie is expired by the given time
-
asString
public String asString()
- Returns:
- a string representation of this cookie
-
-