handler.parse(cookie, attrib.getValue());
public boolean match(final Cookie cookie, final CookieOrigin origin) { if (cookie == null) { throw new IllegalArgumentException("Cookie may not be null"); } if (origin == null) { throw new IllegalArgumentException("Cookie origin may not be null"); } for (CookieAttributeHandler handler: getAttribHandlers()) { if (!handler.match(cookie, origin)) { return false; } } return true; }
public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException { if (cookie == null) { throw new IllegalArgumentException("Cookie may not be null"); } if (origin == null) { throw new IllegalArgumentException("Cookie origin may not be null"); } for (CookieAttributeHandler handler: getAttribHandlers()) { handler.validate(cookie, origin); } }
protected List<Cookie> parse(final HeaderElement[] elems, final CookieOrigin origin) throws MalformedCookieException { List<Cookie> cookies = new ArrayList<Cookie>(elems.length); for (HeaderElement headerelement : elems) { String name = headerelement.getName(); String value = headerelement.getValue(); if (name == null || name.length() == 0) { throw new MalformedCookieException("Cookie name may not be empty"); } BasicClientCookie cookie = new BasicClientCookie(name, value); cookie.setPath(getDefaultPath(origin)); cookie.setDomain(getDefaultDomain(origin)); // cycle through the parameters NameValuePair[] attribs = headerelement.getParameters(); for (int j = attribs.length - 1; j >= 0; j--) { NameValuePair attrib = attribs[j]; String s = attrib.getName().toLowerCase(Locale.ENGLISH); cookie.setAttribute(s, attrib.getValue()); CookieAttributeHandler handler = findAttribHandler(s); if (handler != null) { handler.parse(cookie, attrib.getValue()); } } cookies.add(cookie); } return cookies; }
@Override public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException { wrapped.validate(cookie, origin); }
/** * Never matches if the cookie's domain is from the blacklist. */ @Override public boolean match(final Cookie cookie, final CookieOrigin origin) { if (isForPublicSuffix(cookie)) { return false; } return wrapped.match(cookie, origin); }
@Override public void parse(final SetCookie cookie, final String value) throws MalformedCookieException { wrapped.parse(cookie, value); }
@Override public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException { wrapped.validate(cookie, origin); }
/** * Never matches if the cookie's domain is from the blacklist. */ public boolean match(final Cookie cookie, final CookieOrigin origin) { if (isForPublicSuffix(cookie)) { return false; } return wrapped.match(cookie, origin); }
@Override public void parse(final SetCookie cookie, final String value) throws MalformedCookieException { wrapped.parse(cookie, value); }
public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException { wrapped.validate(cookie, origin); }
/** * Never matches if the cookie's domain is from the blacklist. */ @Override public boolean match(final Cookie cookie, final CookieOrigin origin) { if (isForPublicSuffix(cookie)) { return false; } return wrapped.match(cookie, origin); }
@Override public void parse(final SetCookie cookie, final String value) throws MalformedCookieException { wrapped.parse(cookie, value); }
@Override public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException { wrapped.validate(cookie, origin); }
/** * Never matches if the cookie's domain is from the blacklist. */ @Override public boolean match(final Cookie cookie, final CookieOrigin origin) { if (isForPublicSuffix(cookie)) { return false; } return wrapped.match(cookie, origin); }
public void parse(final SetCookie cookie, final String value) throws MalformedCookieException { wrapped.parse(cookie, value); }
public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException { wrapped.validate(cookie, origin); }
public boolean match(final Cookie cookie, final CookieOrigin origin) { if (cookie == null) { throw new IllegalArgumentException("Cookie may not be null"); } if (origin == null) { throw new IllegalArgumentException("Cookie origin may not be null"); } for (CookieAttributeHandler handler: getAttribHandlers()) { if (!handler.match(cookie, origin)) { return false; } } return true; }
public void parse(final SetCookie cookie, final String value) throws MalformedCookieException { wrapped.parse(cookie, value); }
public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException { if (cookie == null) { throw new IllegalArgumentException("Cookie may not be null"); } if (origin == null) { throw new IllegalArgumentException("Cookie origin may not be null"); } for (CookieAttributeHandler handler: getAttribHandlers()) { handler.validate(cookie, origin); } }