Android APIs
public class

RFC2965PortAttributeHandler

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

Class Overview

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

Summary

Public Constructors
RFC2965PortAttributeHandler()
Public Methods
boolean match(Cookie cookie, CookieOrigin origin)
Match cookie port attribute.
void parse(SetCookie cookie, String portValue)
Parse cookie port attribute.
void validate(Cookie cookie, CookieOrigin origin)
Validate cookie port attribute.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.cookie.CookieAttributeHandler

Public Constructors

public RFC2965PortAttributeHandler ()

Added in API level 1

Public Methods

public boolean match (Cookie cookie, CookieOrigin origin)

Added in API level 1

Match cookie port attribute. If the Port attribute is not specified in header, the cookie can be sent to any port. Otherwise, the request port must be in the cookie's port list.

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 portValue)

Added in API level 1

Parse cookie port attribute.

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

public void validate (Cookie cookie, CookieOrigin origin)

Added in API level 1

Validate cookie port attribute. If the Port attribute was specified in header, the request port must be in cookie's port list.

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