org.w3c.www.http
Class HttpSetCookie

java.lang.Object
  extended by org.w3c.www.http.HttpSetCookie

public class HttpSetCookie
extends java.lang.Object


Field Summary
protected  java.lang.String comment
          The cookie's comment.
protected  java.lang.String domain
          The cookie's domain name.
protected  int maxage
          The cookie's max age.
protected  java.lang.String name
          The cookie's name.
protected  java.lang.String path
          The cookie's associated path.
protected  boolean security
          Does this cookie requires special security care by client ?
protected  java.lang.String value
           
protected  int version
          This cookie's version.
 
Constructor Summary
HttpSetCookie()
           
HttpSetCookie(boolean isValid, java.lang.String name, java.lang.String value)
           
HttpSetCookie(java.lang.String name, java.lang.String value)
           
 
Method Summary
 java.lang.String getComment()
          Get this SetCookie attached comment.
 java.lang.String getDomain()
          Get the domain to which this cookie applies.
 int getMaxAge()
          Get the max age value for this cookie.
 java.lang.String getName()
          Get this SetCookie cookie's name.
 java.lang.String getPath()
          Get the path in which this cookie will apply.
 boolean getSecurity()
          Get the security requirement atttached to that cookie.
 java.lang.String getValue()
          Get the value associated with this SetCookie.
 int getVersion()
          Get the SetCookie version number.
 void setComment(java.lang.String comment)
          Set this SetCookie attached comment.
 void setDomain(java.lang.String domain)
          Define the domain for this SetCookie.
 void setMaxAge(int maxage)
          Set the max age value for this cookie.
 void setName(java.lang.String name)
          Set this SetCookie name.
 void setPath(java.lang.String path)
          Set the path to which this SetCookie applies.
 void setSecurity(boolean onoff)
          Mark/unmark this SetCookie as requiring special security when emited back by the client.
 void setValue(java.lang.String value)
          Set this SetCookie cookie's value.
 void setVersion(int version)
          Set the SetCookie version number.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The cookie's name.


value

protected java.lang.String value

comment

protected java.lang.String comment
The cookie's comment.


domain

protected java.lang.String domain
The cookie's domain name.


maxage

protected int maxage
The cookie's max age.


path

protected java.lang.String path
The cookie's associated path.


security

protected boolean security
Does this cookie requires special security care by client ?


version

protected int version
This cookie's version.

Constructor Detail

HttpSetCookie

public HttpSetCookie(boolean isValid,
                     java.lang.String name,
                     java.lang.String value)

HttpSetCookie

public HttpSetCookie(java.lang.String name,
                     java.lang.String value)

HttpSetCookie

public HttpSetCookie()
Method Detail

getComment

public java.lang.String getComment()
Get this SetCookie attached comment.

Returns:
A String describing the reason for this SetCookie, or null.

setComment

public void setComment(java.lang.String comment)
Set this SetCookie attached comment.

Parameters:
comment - A String giving the comments attached to that SetCookie, or null to reset the value.

getDomain

public java.lang.String getDomain()
Get the domain to which this cookie applies.

Returns:
The string encoding of the domain to which this cookie applies or null if undefined.

setDomain

public void setDomain(java.lang.String domain)
Define the domain for this SetCookie.

Parameters:
domain - The String encoded domain name to which this cookie will apply.

getMaxAge

public int getMaxAge()
Get the max age value for this cookie.

Returns:
A integer number of seconds giving the maximum age allowed for this cookie, or -1 if undefined.

setMaxAge

public void setMaxAge(int maxage)
Set the max age value for this cookie.

Parameters:
maxage - The max age value for this cookie, given as a number of seconds, or -1 to reset value.

getPath

public java.lang.String getPath()
Get the path in which this cookie will apply.

Returns:
The path to which this cookie applies, encoded as a String, or null if undefined.

setPath

public void setPath(java.lang.String path)
Set the path to which this SetCookie applies.

Parameters:
path - The path, encoded as a String.

getSecurity

public boolean getSecurity()
Get the security requirement atttached to that cookie.

Returns:
A boolean, true if the cookie requires special care from the client, false otherwise.

setSecurity

public void setSecurity(boolean onoff)
Mark/unmark this SetCookie as requiring special security when emited back by the client.

Parameters:
onoff - A boolean, true if the cookie that results should be emited with special care, false otherwise.

getVersion

public int getVersion()
Get the SetCookie version number.

Returns:
An integer giving the version number of this cookie.

setVersion

public void setVersion(int version)
Set the SetCookie version number.

Parameters:
version - The version number of this SetCookie.

setName

public void setName(java.lang.String name)
Set this SetCookie name.

Parameters:
name - The name of the cookie, encoded as a String.

getName

public java.lang.String getName()
Get this SetCookie cookie's name.

Returns:
A String giving the cookie's name.

setValue

public void setValue(java.lang.String value)
Set this SetCookie cookie's value.

Parameters:
value - The value, encoded as a printable String, or null to reset the value.

getValue

public java.lang.String getValue()
Get the value associated with this SetCookie.

Returns:
The value, encoded as a String, or null if undefined.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object