Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

RFC2965DomainAttributeHandler

extends Object
implements CookieAttributeHandler
java.lang.Object
   ↳ org.apache.http.impl.cookie.RFC2965DomainAttributeHandler

Class Overview

"Domain" cookie attribute handler for RFC 2965 cookie spec.

Summary

Public Constructors
RFC2965DomainAttributeHandler ()
Public Methods
boolean domainMatch ( String host, String domain)
Performs domain-match as defined by the RFC2965.
boolean match ( Cookie cookie, CookieOrigin origin)
Match cookie domain attribute.
void parse ( SetCookie cookie, String domain)
Parse cookie domain attribute.
void validate ( Cookie cookie, CookieOrigin origin)
Validate cookie domain attribute.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.cookie.CookieAttributeHandler

Public Constructors

public RFC2965DomainAttributeHandler ()

Added in API level 1

Public Methods

public boolean domainMatch ( String host, String domain)

Added in API level 1

Performs domain-match as defined by the RFC2965.

Host A's name domain-matches host B's if

      their host name strings string-compare equal; or
      A is a HDN string and has the form NB, where N is a non-empty name string, B has the form .B', and B' is a HDN string. (So, x.y.com domain-matches .Y.com but not Y.com.)

Parameters
host host name where cookie is received from or being sent to.
domain The cookie domain attribute.
Returns
  • true if the specified host matches the given domain.

public boolean match ( Cookie cookie, CookieOrigin origin)

Added in API level 1

Match cookie domain attribute.

Parameters
cookie Cookie to match
origin the cookie source to match against
Returns
  • true if the match is successful; false otherwise

public void parse ( SetCookie cookie, String domain)

Added in API level 1

Parse cookie domain attribute.

Parameters
cookie Cookie to be updated
domain cookie attribute value from the cookie response header

public void validate ( Cookie cookie, CookieOrigin origin)

Added in API level 1

Validate cookie domain attribute.

Parameters
cookie Cookie to validate
origin the cookie source to validate against