Package org.apache.http.cookie
Class CookieSpecRegistry
java.lang.Object
org.apache.http.cookie.CookieSpecRegistry
- All Implemented Interfaces:
Lookup<CookieSpecProvider>
@Contract(threading=SAFE)
@Deprecated
public final class CookieSpecRegistry
extends Object
implements Lookup<CookieSpecProvider>
Deprecated.
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCookieSpec(String name) Deprecated.Gets thecookie specificationwith the given name.getCookieSpec(String name, HttpParams params) Deprecated.Gets thecookie specificationwith the given ID.Deprecated.Obtains a list containing the names of all registeredcookie specs.Deprecated.voidregister(String name, CookieSpecFactory factory) Deprecated.Registers aCookieSpecFactorywith the given identifier.voidsetItems(Map<String, CookieSpecFactory> map) Deprecated.Populates the internal collection of registeredcookie specswith the content of the map passed as a parameter.voidunregister(String id) Deprecated.Unregisters theCookieSpecFactorywith the given ID.
-
Constructor Details
-
CookieSpecRegistry
public CookieSpecRegistry()Deprecated.
-
-
Method Details
-
register
Deprecated.Registers aCookieSpecFactorywith the given identifier. If a specification with the given name already exists it will be overridden. This nameis the same one used to retrieve theCookieSpecFactoryfromgetCookieSpec(String).- Parameters:
name- the identifier for this specificationfactory- theCookieSpecFactoryclass to register- See Also:
-
unregister
Deprecated.Unregisters theCookieSpecFactorywith the given ID.- Parameters:
id- the identifier of thecookie specificationto unregister
-
getCookieSpec
Deprecated.Gets thecookie specificationwith the given ID.- Parameters:
name- thecookie specificationidentifierparams- theHTTP parametersfor the cookie specification.- Returns:
cookie specification- Throws:
IllegalStateException- if a policy with the given name cannot be found
-
getCookieSpec
Deprecated.Gets thecookie specificationwith the given name.- Parameters:
name- thecookie specificationidentifier- Returns:
cookie specification- Throws:
IllegalStateException- if a policy with the given name cannot be found
-
getSpecNames
Deprecated.Obtains a list containing the names of all registeredcookie 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
Deprecated.Populates the internal collection of registeredcookie specswith the content of the map passed as a parameter.- Parameters:
map- cookie specs
-
lookup
Deprecated.- Specified by:
lookupin interfaceLookup<CookieSpecProvider>
-
Registry.