FileDocCategorySizeDatePackage
CookieAttributeHandler.javaAPI DocAndroid 1.5 API3061Wed May 06 22:41:10 BST 2009org.apache.http.cookie

CookieAttributeHandler

public interface CookieAttributeHandler
Ths interface represents a cookie attribute handler responsible for parsing, validating, and matching a specific cookie attribute, such as path, domain, port, etc. Different cookie specifications can provide a specific implementation for this class based on their cookie handling rules.
author
jain.samit@gmail.com (Samit Jain)
since
4.0

Fields Summary
Constructors Summary
Methods Summary
public booleanmatch(org.apache.http.cookie.Cookie cookie, org.apache.http.cookie.CookieOrigin origin)
Matches the given value (property of the destination host where request is being submitted) with the corresponding cookie attribute.

param
cookie {@link org.apache.http.cookie.Cookie} to match
param
origin the cookie source to match against
return
true if the match is successful; false otherwise

public voidparse(org.apache.http.cookie.SetCookie cookie, java.lang.String value)
Parse the given cookie attribute value and update the corresponding {@link org.apache.http.cookie.Cookie} property.

param
cookie {@link org.apache.http.cookie.Cookie} to be updated
param
value cookie attribute value from the cookie response header

public voidvalidate(org.apache.http.cookie.Cookie cookie, org.apache.http.cookie.CookieOrigin origin)
Peforms cookie validation for the given attribute value.

param
cookie {@link org.apache.http.cookie.Cookie} to validate
param
origin the cookie source to validate against
throws
MalformedCookieException if cookie validation fails for this attribute