@Contract(threading=IMMUTABLE) public class RFC2965DomainAttributeHandler extends Object implements CommonCookieAttributeHandler
"Domain" cookie attribute handler for RFC 2965 cookie spec.| Constructor and Description | 
|---|
| RFC2965DomainAttributeHandler() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | domainMatch(String host,
           String domain)Performs domain-match as defined by the RFC2965. | 
| String | getAttributeName() | 
| 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. | 
public void parse(SetCookie cookie, String domain) throws MalformedCookieException
parse in interface CookieAttributeHandlercookie - Cookie to be updateddomain - cookie attribute value from the cookie response headerMalformedCookieExceptionpublic boolean domainMatch(String host, String domain)
Host A's name domain-matches host B's if
host - host name where cookie is received from or being sent to.domain - The cookie domain attribute.public void validate(Cookie cookie, CookieOrigin origin) throws MalformedCookieException
validate in interface CookieAttributeHandlercookie - Cookie to validateorigin - the cookie source to validate againstMalformedCookieException - if cookie validation fails for this attributepublic boolean match(Cookie cookie, CookieOrigin origin)
match in interface CookieAttributeHandlercookie - Cookie to matchorigin - the cookie source to match againsttrue if the match is successful; false otherwisepublic String getAttributeName()
getAttributeName in interface CommonCookieAttributeHandlerCopyright © 1999–2022 The Apache Software Foundation. All rights reserved.