Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.lutris.http
Class HttpCookieManager  view HttpCookieManager download HttpCookieManager.java

java.lang.Object
  extended bycom.lutris.http.HttpCookieManager

public class HttpCookieManager
extends java.lang.Object

This object manages cookies defined in http request and response headers.

Since:
Harmony2.0
Version:
$Revision: 1.10.12.1 $

Field Summary
private  java.util.Vector cookies
          The set of cookies managed by this object.
 
Constructor Summary
HttpCookieManager()
          Constructs a new cookie manager.
 
Method Summary
 void clear()
          Removes all cookies from this manager.
 javax.servlet.http.Cookie[] getCookies()
          Returns an array of the cookies being managed.
 java.lang.String getRequestHeader()
          Returns the string representation of all the cookies being managed by this object as an http cookie request header.
 java.lang.String getRequestHeader(java.lang.String path, java.lang.String domain)
          Returns the string representation of the cookies being managed by this object as an http cookie request header The format of the header is:
 java.lang.String getResponseHeader()
          Returns the string representation of the cookies being managed by this object as an http cookie response ("Set-Cookie") header.
 void mergeHeader(java.lang.String header)
          Merges the cookies contained in the specified http response header into the set of cookies being managed by this object.
private  boolean testEquality(javax.servlet.http.Cookie c1, javax.servlet.http.Cookie c2)
          Compares two cookies.
 java.lang.String toString()
          Returns the string representation of the headers/cookies being managed by this object as an http cookie response header (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cookies

private java.util.Vector cookies
The set of cookies managed by this object.

Constructor Detail

HttpCookieManager

public HttpCookieManager()
Constructs a new cookie manager.

Method Detail

getRequestHeader

public java.lang.String getRequestHeader()
Returns the string representation of all the cookies being managed by this object as an http cookie request header. The format of the header is:
    NAME1=VALUE1; NAME2=VALUE2; ....
 


getRequestHeader

public java.lang.String getRequestHeader(java.lang.String path,
                                         java.lang.String domain)
Returns the string representation of the cookies being managed by this object as an http cookie request header The format of the header is:
    NAME1=VALUE1; NAME2=VALUE2; ....
 


getResponseHeader

public java.lang.String getResponseHeader()
Returns the string representation of the cookies being managed by this object as an http cookie response ("Set-Cookie") header. The format of the header is a comma (,) separated list of:
   name=value [;EXPIRES=dateValue] [;DOMAIN=domainName]
              [;PATH=path] [;SECURE]
 


mergeHeader

public void mergeHeader(java.lang.String header)
Merges the cookies contained in the specified http response header into the set of cookies being managed by this object.


getCookies

public javax.servlet.http.Cookie[] getCookies()
Returns an array of the cookies being managed.


clear

public void clear()
Removes all cookies from this manager.


toString

public java.lang.String toString()
Returns the string representation of the headers/cookies being managed by this object as an http cookie response header (i.e. Set-Cookie header).


testEquality

private boolean testEquality(javax.servlet.http.Cookie c1,
                             javax.servlet.http.Cookie c2)
Compares two cookies. If the name, path, and domain are the same then the cookies are equal equal.