Top Constructors Methods
org.apache.http.impl.cookie

public Class NetscapeDomainHandler

extends BasicDomainHandler
Class Inheritance
Annotations
@Contract
threading:IMMUTABLE
Imports
java.util.Locale, .StringTokenizer, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.cookie.ClientCookie, .Cookie, .CookieOrigin, .CookieRestrictionViolationException, .MalformedCookieException, .SetCookie, org.apache.http.util.Args, .TextUtils

Since
4.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
private static boolean

Returns:

True if the specified domain is "special"
isSpecialDomain
(final String
The domain.
domain
)

Checks if the given domain is in one of the seven special top level domains defined by the Netscape cookie specification.

public boolean
match(final Cookie cookie, final CookieOrigin
the cookie source to match against
origin
)

Overrides org.apache.http.impl.cookie.BasicDomainHandler.match.

Implements org.apache.http.cookie.CookieAttributeHandler.match.

Matches the given value (property of the destination host where request is being submitted) with the corresponding cookie attribute.
public void
parse(final SetCookie cookie, final String
cookie attribute value from the cookie response header
value
)

Overrides org.apache.http.impl.cookie.BasicDomainHandler.parse.

Implements org.apache.http.cookie.CookieAttributeHandler.parse.

Parse the given cookie attribute value and update the corresponding org.apache.http.cookie.Cookie property.
public void
validate(final Cookie cookie, final CookieOrigin
the cookie source to validate against
origin
)

Overrides org.apache.http.impl.cookie.BasicDomainHandler.validate.

Implements org.apache.http.cookie.CookieAttributeHandler.validate.

Peforms cookie validation for the given attribute value.
Inherited from org.apache.http.impl.cookie.BasicDomainHandler:
domainMatch

Constructor Detail

NetscapeDomainHandlerback to summary
public NetscapeDomainHandler()

Method Detail

getAttributeNameback to summary
public String getAttributeName()

Overrides org.apache.http.impl.cookie.BasicDomainHandler.getAttributeName.

Implements org.apache.http.cookie.CommonCookieAttributeHandler.getAttributeName.

Annotations
@Override
isSpecialDomainback to summary
private static boolean isSpecialDomain(final String domain)

Checks if the given domain is in one of the seven special top level domains defined by the Netscape cookie specification.

Parameters
domain:String

The domain.

Returns:boolean

True if the specified domain is "special"

matchback to summary
public boolean match(final Cookie cookie, final CookieOrigin origin)

Overrides org.apache.http.impl.cookie.BasicDomainHandler.match.

Implements org.apache.http.cookie.CookieAttributeHandler.match.

Doc from org.apache.http.cookie.CookieAttributeHandler.match.

Matches the given value (property of the destination host where request is being submitted) with the corresponding cookie attribute.

Parameters
cookie:Cookie

org.apache.http.cookie.Cookie to match

origin:CookieOrigin

the cookie source to match against

Returns:boolean

true if the match is successful; false otherwise

Annotations
@Override
parseback to summary
public void parse(final SetCookie cookie, final String value) throws MalformedCookieException

Overrides org.apache.http.impl.cookie.BasicDomainHandler.parse.

Implements org.apache.http.cookie.CookieAttributeHandler.parse.

Doc from org.apache.http.cookie.CookieAttributeHandler.parse.

Parse the given cookie attribute value and update the corresponding org.apache.http.cookie.Cookie property.

Parameters
cookie:SetCookie

org.apache.http.cookie.Cookie to be updated

value:String

cookie attribute value from the cookie response header

Annotations
@Override
validateback to summary
public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException

Overrides org.apache.http.impl.cookie.BasicDomainHandler.validate.

Implements org.apache.http.cookie.CookieAttributeHandler.validate.

Doc from org.apache.http.cookie.CookieAttributeHandler.validate.

Peforms cookie validation for the given attribute value.

Parameters
cookie:Cookie

org.apache.http.cookie.Cookie to validate

origin:CookieOrigin

the cookie source to validate against

Annotations
@Override
Exceptions
MalformedCookieException:
if cookie validation fails for this attribute