CookieSpecBase (Apache HttpClient 4.5.13 API)
Date: 2020-10-03

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.impl.cookie
Class CookieSpecBase

    java.lang.Object
      org.apache.http.impl.cookie.AbstractCookieSpec
          org.apache.http.impl.cookie.CookieSpecBase

All Implemented Interfaces:
  CookieSpec

Direct Known Subclasses:
  BrowserCompatSpec, IgnoreSpec, NetscapeDraftSpec, RFC2109Spec

    @Contract(threading=SAFE)
    public abstract class CookieSpecBase

extends AbstractCookieSpec

Cookie management functions shared by all specification.

Since:
  4.0

Constructor Summary
`` | `CookieSpecBase()`
`protected` | `CookieSpecBase(CommonCookieAttributeHandler... handlers)`
`protected` | `CookieSpecBase(HashMap<String,CookieAttributeHandler> map)`

Method Summary
`protected static String` | `getDefaultDomain(CookieOrigin origin)`
`protected static String` | `getDefaultPath(CookieOrigin origin)`
`boolean` | `match(Cookie cookie, CookieOrigin origin)` Determines if a Cookie matches the target location.
`protected List<Cookie>` | `parse(org.apache.http.HeaderElement[] elems, CookieOrigin origin)`
`void` | `validate(Cookie cookie, CookieOrigin origin)` Validate the cookie according to validation rules defined by the cookie specification.

Methods inherited from class org.apache.http.impl.cookie.AbstractCookieSpec
`findAttribHandler, getAttribHandler, getAttribHandlers, registerAttribHandler`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.http.cookie.CookieSpec
`formatCookies, getVersion, getVersionHeader, parse`

Constructor Detail

### CookieSpecBase

    public CookieSpecBase()

### CookieSpecBase

    protected CookieSpecBase(HashMap<String,CookieAttributeHandler> map)

Since:
  4.4

### CookieSpecBase

    protected CookieSpecBase(CommonCookieAttributeHandler... handlers)

Since:
  4.4

Method Detail

### getDefaultPath

    protected static String getDefaultPath(CookieOrigin origin)

### getDefaultDomain

    protected static String getDefaultDomain(CookieOrigin origin)

### parse

    protected List<Cookie> parse(org.apache.http.HeaderElement[] elems,
                                 CookieOrigin origin)
                          throws MalformedCookieException

  Throws:
    `MalformedCookieException`

### validate

    public void validate(Cookie cookie,
                         CookieOrigin origin)
                  throws MalformedCookieException

  Description copied from interface: `CookieSpec`
  Validate the cookie according to validation rules defined by the cookie specification.

  Parameters:
    `cookie` - the Cookie to validate
    `origin` - details of the cookie origin
  Throws:
    `MalformedCookieException` - if the cookie is invalid

### match

    public boolean match(Cookie cookie,
                         CookieOrigin origin)

  Description copied from interface: `CookieSpec`
  Determines if a Cookie matches the target location.

  Parameters:
    `cookie` - the Cookie to be matched
    `origin` - the target to test against
  Returns:
    `true` if the cookie should be submitted with a request with given attributes, `false` otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999–2020 The Apache Software Foundation. All rights reserved.