Package com.ibm.wsspi.http
Class HttpCookie
java.lang.Object
com.ibm.wsspi.http.HttpCookie
HTTP cookie object, similar to the J2EE servlet cookie object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
getAttribute
(String name) Query a generic attribute of this cookie.Query the comment attribute of this cookie.Query the domain attribute of this cookie.int
Query the max-age attribute of this cookie.getName()
Query the name of this cookie.getPath()
Query the path attribute of this cookie.getValue()
Query the value of this cookie.int
Query the version attribute of this cookie.boolean
Query if the Discard attribute is set.boolean
Query if the HttpOnly attribute is set.boolean
isSecure()
Query the secure-flag attribute of this cookie.void
setAttribute
(String name, String value) Set a generic attribute on this cookie.void
setComment
(String comment) Set the comment attribute of this cookie.void
setDiscard
(boolean flag) Set the Discard attribute flag.void
Set the domain attribute of this cookie.void
setHttpOnly
(boolean flag) Set the HttpOnly special attribute flag.void
setMaxAge
(int age) Set the max-age attribute of this cookie.void
Set the path attribute of this cookie.void
setSecure
(boolean flag) Set the secure-flag attribute of this cookie.void
setVersion
(int version) Set the version attribute of this cookie to the input value.
-
Constructor Details
-
HttpCookie
Constructor.- Parameters:
name
-value
-
-
-
Method Details
-
getName
Query the name of this cookie.- Returns:
- String
-
getValue
Query the value of this cookie. This might be null, an empty string, or a full valid string.- Returns:
- String
-
getComment
Query the comment attribute of this cookie.- Returns:
- String
-
getPath
Query the path attribute of this cookie.- Returns:
- String
-
getDomain
Query the domain attribute of this cookie.- Returns:
- String
-
isSecure
public boolean isSecure()Query the secure-flag attribute of this cookie.- Returns:
- String
-
getMaxAge
public int getMaxAge()Query the max-age attribute of this cookie.- Returns:
- String
-
setAttribute
Set a generic attribute on this cookie.- Parameters:
name
-value
-
-
getAttribute
Query a generic attribute of this cookie.- Parameters:
name
-- Returns:
- String
-
getVersion
public int getVersion()Query the version attribute of this cookie.- Returns:
- int
-
setVersion
public void setVersion(int version) Set the version attribute of this cookie to the input value. Valid options include 0 and 1 only.- Parameters:
version
-
-
setComment
Set the comment attribute of this cookie.- Parameters:
comment
-
-
setDomain
Set the domain attribute of this cookie.- Parameters:
domain
-
-
setPath
Set the path attribute of this cookie.- Parameters:
path
-
-
setSecure
public void setSecure(boolean flag) Set the secure-flag attribute of this cookie.- Parameters:
flag
-
-
setMaxAge
public void setMaxAge(int age) Set the max-age attribute of this cookie.- Parameters:
age
-
-
isHttpOnly
public boolean isHttpOnly()Query if the HttpOnly attribute is set.- Returns:
- boolean
-
setHttpOnly
public void setHttpOnly(boolean flag) Set the HttpOnly special attribute flag.- Parameters:
flag
-
-
isDiscard
public boolean isDiscard()Query if the Discard attribute is set.- Returns:
- boolean
-
setDiscard
public void setDiscard(boolean flag) Set the Discard attribute flag.- Parameters:
flag
-
-
clone
-
getAttributes
-