Package org.apache.cxf.transport.http
Class Cookie
java.lang.Object
org.apache.cxf.transport.http.Cookie
Container for HTTP cookies used to track
session state.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGet the max-age of this cookiegetName()Get the name of this cookiegetPath()Get the path of this cookiegetValue()Get the value of this cookieinthashCode()Convert a list of cookies into a string suitable for sending as a "Cookie:" headervoidsetMaxAge(int maxAge) Set the max-age of this cookie.voidSet the path of this cookievoidChange the value of this cookie
-
Field Details
-
DISCARD_ATTRIBUTE
- See Also:
-
MAX_AGE_ATTRIBUTE
- See Also:
-
PATH_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
Cookie
Create a new cookie with the supplied name/value pair- Parameters:
name-value-
-
-
Method Details
-
getName
Get the name of this cookie- Returns:
- cookie name
-
setValue
Change the value of this cookie- Parameters:
value-
-
getValue
Get the value of this cookie- Returns:
- cookie value
-
setPath
Set the path of this cookie- Parameters:
path-
-
getPath
Get the path of this cookie- Returns:
- cookie path
-
setMaxAge
public void setMaxAge(int maxAge) Set the max-age of this cookie. If set to 0, it should be removed from the session.- Parameters:
maxAge-
-
getMaxAge
public int getMaxAge()Get the max-age of this cookie- Returns:
-
hashCode
public int hashCode() -
equals
-
requestCookieHeader
Convert a list of cookies into a string suitable for sending as a "Cookie:" header- Returns:
- Cookie header text
-