com.ibm.wsspi.http

Class HttpCookie

  1. java.lang.Object
  2. extended bycom.ibm.wsspi.http.HttpCookie

  1. public class HttpCookie
  2. extends java.lang.Object
HTTP cookie object, similar to the J2EE servlet cookie object.

Constructor Summary

Constructor and Description
HttpCookie(java.lang.String name,java.lang.String value)
Constructor.

Method Summary

Modifier and Type Method and Description
  1. HttpCookie
clone()
  1. java.lang.String
getAttribute(java.lang.String name)
Query a generic attribute of this cookie.
  1. java.lang.String
getComment()
Query the comment attribute of this cookie.
  1. java.lang.String
getDomain()
Query the domain attribute of this cookie.
  1. int
getMaxAge()
Query the max-age attribute of this cookie.
  1. java.lang.String
getName()
Query the name of this cookie.
  1. java.lang.String
getPath()
Query the path attribute of this cookie.
  1. java.lang.String
getValue()
Query the value of this cookie.
  1. int
getVersion()
Query the version attribute of this cookie.
  1. boolean
isDiscard()
Query if the Discard attribute is set.
  1. boolean
isHttpOnly()
Query if the HttpOnly attribute is set.
  1. boolean
isSecure()
Query the secure-flag attribute of this cookie.
  1. void
setAttribute(java.lang.String name,java.lang.String value)
Set a generic attribute on this cookie.
  1. void
setComment(java.lang.String comment)
Set the comment attribute of this cookie.
  1. void
setDiscard(boolean flag)
Set the Discard attribute flag.
  1. void
setDomain(java.lang.String domain)
Set the domain attribute of this cookie.
  1. void
setHttpOnly(boolean flag)
Set the HttpOnly special attribute flag.
  1. void
setMaxAge(int age)
Set the max-age attribute of this cookie.
  1. void
setPath(java.lang.String path)
Set the path attribute of this cookie.
  1. void
setSecure(boolean flag)
Set the secure-flag attribute of this cookie.
  1. void
setVersion(int version)
Set the version attribute of this cookie to the input value.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HttpCookie

  1. public HttpCookie(java.lang.String name,
  2. java.lang.String value)
Constructor.
Parameters:
name -
value -

Method Detail

getName

  1. public java.lang.String getName( )
Query the name of this cookie.
Returns:
String

getValue

  1. public java.lang.String getValue( )
Query the value of this cookie. This might be null, an empty string, or a full valid string.
Returns:
String

getComment

  1. public java.lang.String getComment( )
Query the comment attribute of this cookie.
Returns:
String

getPath

  1. public java.lang.String getPath( )
Query the path attribute of this cookie.
Returns:
String

getDomain

  1. public java.lang.String getDomain( )
Query the domain attribute of this cookie.
Returns:
String

isSecure

  1. public boolean isSecure()
Query the secure-flag attribute of this cookie.
Returns:
String

getMaxAge

  1. public int getMaxAge()
Query the max-age attribute of this cookie.
Returns:
String

setAttribute

  1. public void setAttribute(java.lang.String name,
  2. java.lang.String value)
Set a generic attribute on this cookie.
Parameters:
name -
value -

getAttribute

  1. public java.lang.String getAttribute( java.lang.String name)
Query a generic attribute of this cookie.
Parameters:
name -
Returns:
String

getVersion

  1. public int getVersion()
Query the version attribute of this cookie.
Returns:
int

setVersion

  1. 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

  1. public void setComment(java.lang.String comment)
Set the comment attribute of this cookie.
Parameters:
comment -

setDomain

  1. public void setDomain(java.lang.String domain)
Set the domain attribute of this cookie.
Parameters:
domain -

setPath

  1. public void setPath(java.lang.String path)
Set the path attribute of this cookie.
Parameters:
path -

setSecure

  1. public void setSecure(boolean flag)
Set the secure-flag attribute of this cookie.
Parameters:
flag -

setMaxAge

  1. public void setMaxAge(int age)
Set the max-age attribute of this cookie.
Parameters:
age -

isHttpOnly

  1. public boolean isHttpOnly()
Query if the HttpOnly attribute is set.
Returns:
boolean

setHttpOnly

  1. public void setHttpOnly(boolean flag)
Set the HttpOnly special attribute flag.
Parameters:
flag -

isDiscard

  1. public boolean isDiscard()
Query if the Discard attribute is set.
Returns:
boolean

setDiscard

  1. public void setDiscard(boolean flag)
Set the Discard attribute flag.
Parameters:
flag -

clone

  1. public HttpCookie clone()
Overrides:
clone in class java.lang.Object