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 java.lang.Object implements Lookup<CookieSpecProvider>
Deprecated.(4.3) useRegistry
.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 Constructor Description CookieSpecRegistry()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CookieSpec
getCookieSpec(java.lang.String name)
Deprecated.Gets thecookie specification
with the given name.CookieSpec
getCookieSpec(java.lang.String name, HttpParams params)
Deprecated.Gets thecookie specification
with the given ID.java.util.List<java.lang.String>
getSpecNames()
Deprecated.Obtains a list containing the names of all registeredcookie specs
.CookieSpecProvider
lookup(java.lang.String name)
Deprecated.void
register(java.lang.String name, CookieSpecFactory factory)
Deprecated.Registers aCookieSpecFactory
with the given identifier.void
setItems(java.util.Map<java.lang.String,CookieSpecFactory> map)
Deprecated.Populates the internal collection of registeredcookie specs
with the content of the map passed as a parameter.void
unregister(java.lang.String id)
Deprecated.Unregisters theCookieSpecFactory
with the given ID.
-
-
-
Method Detail
-
register
public void register(java.lang.String name, CookieSpecFactory factory)
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:
getCookieSpec(String)
-
unregister
public void unregister(java.lang.String id)
Deprecated.Unregisters theCookieSpecFactory
with the given ID.- Parameters:
id
- the identifier of thecookie specification
to unregister
-
getCookieSpec
public CookieSpec getCookieSpec(java.lang.String name, HttpParams params) throws java.lang.IllegalStateException
Deprecated.Gets thecookie specification
with the given ID.- Parameters:
name
- thecookie specification
identifierparams
- theHTTP parameters
for the cookie specification.- Returns:
cookie specification
- Throws:
java.lang.IllegalStateException
- if a policy with the given name cannot be found
-
getCookieSpec
public CookieSpec getCookieSpec(java.lang.String name) throws java.lang.IllegalStateException
Deprecated.Gets thecookie specification
with the given name.- Parameters:
name
- thecookie specification
identifier- Returns:
cookie specification
- Throws:
java.lang.IllegalStateException
- if a policy with the given name cannot be found
-
getSpecNames
public java.util.List<java.lang.String> 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
public void setItems(java.util.Map<java.lang.String,CookieSpecFactory> map)
Deprecated.Populates the internal collection of registeredcookie specs
with the content of the map passed as a parameter.- Parameters:
map
- cookie specs
-
lookup
public CookieSpecProvider lookup(java.lang.String name)
Deprecated.- Specified by:
lookup
in interfaceLookup<CookieSpecProvider>
-
-