Package org.apache.cxf.transport.http
Class Cookie
- java.lang.Object
-
- org.apache.cxf.transport.http.Cookie
-
public class Cookie extends Object
Container for HTTP cookies used to track session state.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DISCARD_ATTRIBUTE
static String
MAX_AGE_ATTRIBUTE
static String
PATH_ATTRIBUTE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
getMaxAge()
Get the max-age of this cookieString
getName()
Get the name of this cookieString
getPath()
Get the path of this cookieString
getValue()
Get the value of this cookieint
hashCode()
String
requestCookieHeader()
Convert a list of cookies into a string suitable for sending as a "Cookie:" headervoid
setMaxAge(int maxAge)
Set the max-age of this cookie.void
setPath(String path)
Set the path of this cookievoid
setValue(String value)
Change the value of this cookie
-
-
-
Field Detail
-
DISCARD_ATTRIBUTE
public static final String DISCARD_ATTRIBUTE
- See Also:
- Constant Field Values
-
MAX_AGE_ATTRIBUTE
public static final String MAX_AGE_ATTRIBUTE
- See Also:
- Constant Field Values
-
PATH_ATTRIBUTE
public static final String PATH_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
Get the name of this cookie- Returns:
- cookie name
-
setValue
public void setValue(String value)
Change the value of this cookie- Parameters:
value
-
-
getValue
public String getValue()
Get the value of this cookie- Returns:
- cookie value
-
setPath
public void setPath(String path)
Set the path of this cookie- Parameters:
path
-
-
getPath
public String 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:
-
requestCookieHeader
public String requestCookieHeader()
Convert a list of cookies into a string suitable for sending as a "Cookie:" header- Returns:
- Cookie header text
-
-