|
TPTP 4.4.0 Testing Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.hyades.test.http.runner.HttpCookieCache
This class handles cookies in the Cookie Cache. It stores them and then retrieves them for Http Request Headers.
| Nested Class Summary | |
|---|---|
class |
HttpCookieCache.InvalidCookieException
this little inner class handles what few exceptions for invalid cookies might come up |
| Field Summary | |
|---|---|
java.util.LinkedList |
CookieCache
|
| Constructor Summary | |
|---|---|
HttpCookieCache()
|
|
| Method Summary | |
|---|---|
int |
add_new_cookie(int idx,
int jdx,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip)
|
int |
add_new_domain(org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip,
java.lang.String host)
This routine adds a new domain to cookie cache linked lists. |
int |
add_new_path(int idx,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip)
This routine adds a new path to CookieCache linked lists. |
int |
AddCookie(java.lang.String Name,
java.lang.String Value,
java.lang.String Domain,
java.lang.String Path,
java.lang.String Expires,
boolean secure)
This routine is for prepopulation ONLY. |
int |
check_dots(org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip,
java.lang.StringBuffer Message)
this routine checks that the domain of a cookie has an appropriate number of dots. |
int |
check_ondom(HttpRequest req,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip,
java.lang.StringBuffer Message)
This routine checks that a host setting a cookie belongs to the domain of the cookie. |
void |
clearCookieCache()
this routine is for clearing a populated Cache |
int |
cookie_match(org.eclipse.hyades.test.http.runner.internal.exec.CookieLL cookiep,
java.lang.String ckienam)
Deprecated. .. This routine is to be private in future |
void |
cookielogger(java.util.logging.Level lvl,
java.lang.String mymsg)
In order to have anything logged, JSR047 options must be turned on. |
void |
deleteCookie(java.lang.String Domain,
java.lang.String Path,
java.lang.String Name,
java.lang.String Value)
|
int |
domain_match(int getflag,
java.lang.String dom1,
java.lang.String dom2,
org.eclipse.hyades.test.http.runner.internal.exec.DomLL domentry)
|
void |
DynamicGetCookie(HttpRequest request)
This is the routine to get a dynamic cookie from the Cache |
void |
DynamicSetCookie(HttpRequest request,
HttpResponse response)
This is the routine that sets dynamic cookies into the cache. |
int |
findattr(java.lang.String attr,
java.lang.String str,
int semi)
This routine specifically searches for attribute strings of cookies |
int |
get_time_left(java.lang.String exp)
|
protected int |
is_ipaddr(java.lang.String dom)
this is a quick check to see if a domain is specified by ip addr it does not go so far as to check that the actual numbers used in the addr are valid for an ip address. |
void |
makecapcookie(java.lang.String reqhdrs,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie statc,
java.util.LinkedList fndcookies,
int eqi,
HttpRequest request,
java.lang.String cnam)
this routine turns a captured cookie into a cookie object and lists it with fndcookies |
int |
parse_cookie(HttpRequest req,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip,
java.lang.String setckhdr)
This routine parses a cookie before setting it |
boolean |
parse_secure(int idx,
java.lang.String tmpstr)
This routine is checking that a 'secure' attribute is really an attribute |
int |
path_match(java.lang.String path1,
java.lang.String path2)
Deprecated. ... this is to be private in future |
void |
replace_cookie(int i,
int j,
int k,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip)
|
int |
search_repl_cache(org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip,
java.lang.String host)
This routine searches the cookie cache |
java.util.LinkedList |
sep_cookies(HttpHeader reqhdr)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.util.LinkedList CookieCache
| Constructor Detail |
public HttpCookieCache()
| Method Detail |
public void DynamicSetCookie(HttpRequest request,
HttpResponse response)
throws HttpCookieCache.InvalidCookieException,
java.lang.Exception
request - HttpRequest object containing HTTP requestresponse - HttpResponse object containing HTTP response
HttpCookieCache.InvalidCookieException
java.lang.Exceptionpublic void DynamicGetCookie(HttpRequest request)
request - HttpRequest object containing request
This routine searches the CookieCache and returns those
matching the request for host/domain and path and security
if they have not expired by the original Netscape cookie spec
guidelines.
The cookies are returned by adding a Cookie: hdr to the
request object.
public void makecapcookie(java.lang.String reqhdrs,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie statc,
java.util.LinkedList fndcookies,
int eqi,
HttpRequest request,
java.lang.String cnam)
public java.util.LinkedList sep_cookies(HttpHeader reqhdr)
public int AddCookie(java.lang.String Name,
java.lang.String Value,
java.lang.String Domain,
java.lang.String Path,
java.lang.String Expires,
boolean secure)
Name - String Name part of cookiename=value;Value - String Value of cookiename.Domain - String value of hostname or Domain name.Path - String Value of PathExpires - String value of expires= stringsecure - Boolean for secure flag
public void deleteCookie(java.lang.String Domain,
java.lang.String Path,
java.lang.String Name,
java.lang.String Value)
public void clearCookieCache()
public int search_repl_cache(org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip,
java.lang.String host)
chip - the cookie we are looking to place in cache
public int path_match(java.lang.String path1,
java.lang.String path2)
path1 - Stringpath2 - String
public void replace_cookie(int i,
int j,
int k,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip)
i - j - k - chip -
public int cookie_match(org.eclipse.hyades.test.http.runner.internal.exec.CookieLL cookiep,
java.lang.String ckienam)
cookiep - ckienam -
public int get_time_left(java.lang.String exp)
exp - Expires string from cookie
public int domain_match(int getflag,
java.lang.String dom1,
java.lang.String dom2,
org.eclipse.hyades.test.http.runner.internal.exec.DomLL domentry)
dom1 - first domain to comparedom2 - second domain to compare
protected int is_ipaddr(java.lang.String dom)
public int add_new_domain(org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip,
java.lang.String host)
chip - host -
public int add_new_path(int idx,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip)
idx - chip -
public int add_new_cookie(int idx,
int jdx,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip)
idx - jdx - chip -
public int parse_cookie(HttpRequest req,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip,
java.lang.String setckhdr)
throws HttpCookieCache.InvalidCookieException
HttpCookieCache.InvalidCookieException
public int findattr(java.lang.String attr,
java.lang.String str,
int semi)
public boolean parse_secure(int idx,
java.lang.String tmpstr)
idx - tmpstr -
public int check_ondom(HttpRequest req,
org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip,
java.lang.StringBuffer Message)
public int check_dots(org.eclipse.hyades.test.http.runner.internal.exec.Cookie chip,
java.lang.StringBuffer Message)
public void cookielogger(java.util.logging.Level lvl,
java.lang.String mymsg)
lvl - Integer..the logging level.mymsg - String, the text of the message.
|
TPTP 4.4.0 Testing Tools Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||