CookieSpecRegistry (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.cookie
Class CookieSpecRegistry

    java.lang.Object
      org.apache.http.cookie.CookieSpecRegistry

All Implemented Interfaces:
  org.apache.http.config.Lookup<CookieSpecProvider>

Deprecated. (4.3) use `Registry`.

    @Contract(threading=SAFE)
    @Deprecated
    public final class CookieSpecRegistry

extends Object
implements org.apache.http.config.Lookup<CookieSpecProvider>

Cookie specification registry that can be used to obtain the corresponding cookie specification implementation for a given type of type or version of cookie.

Since:
  4.0

Constructor Summary
`CookieSpecRegistry()` Deprecated.

Method Summary
`CookieSpec` | `getCookieSpec(String name)` Deprecated. Gets the `cookie specification` with the given name.
`CookieSpec` | `getCookieSpec(String name, org.apache.http.params.HttpParams params)` Deprecated. Gets the `cookie specification` with the given ID.
`List<String>` | `getSpecNames()` Deprecated. Obtains a list containing the names of all registered `cookie specs`.
`CookieSpecProvider` | `lookup(String name)` Deprecated.
`void` | `register(String name, CookieSpecFactory factory)` Deprecated. Registers a `CookieSpecFactory` with the given identifier.
`void` | `setItems(Map<String,CookieSpecFactory> map)` Deprecated. Populates the internal collection of registered `cookie specs` with the content of the map passed as a parameter.
`void` | `unregister(String id)` Deprecated. Unregisters the `CookieSpecFactory` with the given ID.

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

Constructor Detail

### CookieSpecRegistry

    public CookieSpecRegistry()

  Deprecated.

Method Detail

### register

    public void register(String name,
                         CookieSpecFactory factory)

  Deprecated.
  Registers a `CookieSpecFactory` with the given identifier. If a specification with the given name already exists it will be overridden. This nameis the same one used to retrieve the `CookieSpecFactory` from `getCookieSpec(String)`.

  Parameters:
    `name` - the identifier for this specification
    `factory` - the `CookieSpecFactory` class to register
  See Also:
    `getCookieSpec(String)`

### unregister

    public void unregister(String id)

  Deprecated.
  Unregisters the `CookieSpecFactory` with the given ID.

  Parameters:
    `id` - the identifier of the `cookie specification` to unregister

### getCookieSpec

    public CookieSpec getCookieSpec(String name,
                                    org.apache.http.params.HttpParams params)
                             throws IllegalStateException

  Deprecated.
  Gets the `cookie specification` with the given ID.

  Parameters:
    `name` - the `cookie specification` identifier
    `params` - the `HTTP parameters` for the cookie specification.
  Returns:
    `cookie specification`
  Throws:
    `IllegalStateException` - if a policy with the given name cannot be found

### getCookieSpec

    public CookieSpec getCookieSpec(String name)
                             throws IllegalStateException

  Deprecated.
  Gets the `cookie specification` with the given name.

  Parameters:
    `name` - the `cookie specification` identifier
  Returns:
    `cookie specification`
  Throws:
    `IllegalStateException` - if a policy with the given name cannot be found

### getSpecNames

    public List<String> getSpecNames()

  Deprecated.
  Obtains a list containing the names of all registered `cookie specs`. Note that the DEFAULT policy (if present) is likely to be the same as one of the other policies, but does not have to be.

  Returns:
    list of registered cookie spec names

### setItems

    public void setItems(Map<String,CookieSpecFactory> map)

  Deprecated.
  Populates the internal collection of registered `cookie specs` with the content of the map passed as a parameter.

  Parameters:
    `map` - cookie specs

### lookup

    public CookieSpecProvider lookup(String name)

  Deprecated.
  Specified by:
    `lookup` in interface `org.apache.http.config.Lookup<CookieSpecProvider>`

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.