Package org.apache.http.cookie
Class CookieSpecRegistry
java.lang.Object
org.apache.http.cookie.CookieSpecRegistry
- All Implemented Interfaces:
org.apache.http.config.Lookup<CookieSpecProvider>
@Contract(threading=SAFE)
@Deprecated
public final class CookieSpecRegistry
extends Object
implements org.apache.http.config.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 specification
with the given name.getCookieSpec
(String name, org.apache.http.params.HttpParams params) Deprecated.Gets thecookie specification
with the given ID.Deprecated.Obtains a list containing the names of all registeredcookie specs
.Deprecated.void
register
(String name, CookieSpecFactory factory) Deprecated.Registers aCookieSpecFactory
with the given identifier.void
setItems
(Map<String, CookieSpecFactory> map) Deprecated.Populates the internal collection of registeredcookie specs
with the content of the map passed as a parameter.void
unregister
(String id) Deprecated.Unregisters theCookieSpecFactory
with the given ID.
-
Constructor Details
-
CookieSpecRegistry
public CookieSpecRegistry()Deprecated.
-
-
Method Details
-
register
Deprecated.Registers aCookieSpecFactory
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 theCookieSpecFactory
fromgetCookieSpec(String)
.- Parameters:
name
- the identifier for this specificationfactory
- theCookieSpecFactory
class to register- See Also:
-
unregister
Deprecated.Unregisters theCookieSpecFactory
with the given ID.- Parameters:
id
- the identifier of thecookie specification
to unregister
-
getCookieSpec
public CookieSpec getCookieSpec(String name, org.apache.http.params.HttpParams params) throws IllegalStateException Deprecated.Gets thecookie specification
with the given ID.- Parameters:
name
- thecookie specification
identifierparams
- theHTTP parameters
for the cookie specification.- Returns:
cookie specification
- Throws:
IllegalStateException
- if a policy with the given name cannot be found
-
getCookieSpec
Deprecated.Gets thecookie specification
with the given name.- Parameters:
name
- thecookie specification
identifier- 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 specs
with the content of the map passed as a parameter.- Parameters:
map
- cookie specs
-
lookup
Deprecated.- Specified by:
lookup
in interfaceorg.apache.http.config.Lookup<CookieSpecProvider>
-
Registry
.