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 CookieSpecgetCookieSpec(java.lang.String name)Deprecated.Gets thecookie specificationwith the given name.CookieSpecgetCookieSpec(java.lang.String name, HttpParams params)Deprecated.Gets thecookie specificationwith the given ID.java.util.List<java.lang.String>getSpecNames()Deprecated.Obtains a list containing the names of all registeredcookie specs.CookieSpecProviderlookup(java.lang.String name)Deprecated.voidregister(java.lang.String name, CookieSpecFactory factory)Deprecated.Registers aCookieSpecFactorywith the given identifier.voidsetItems(java.util.Map<java.lang.String,CookieSpecFactory> map)Deprecated.Populates the internal collection of registeredcookie specswith the content of the map passed as a parameter.voidunregister(java.lang.String id)Deprecated.Unregisters theCookieSpecFactorywith the given ID.
-
-
-
Method Detail
-
register
public void register(java.lang.String name, CookieSpecFactory factory)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:
getCookieSpec(String)
-
unregister
public void unregister(java.lang.String id)
Deprecated.Unregisters theCookieSpecFactorywith the given ID.- Parameters:
id- the identifier of thecookie specificationto unregister
-
getCookieSpec
public CookieSpec getCookieSpec(java.lang.String name, HttpParams params) throws java.lang.IllegalStateException
Deprecated.Gets thecookie specificationwith the given ID.- Parameters:
name- thecookie specificationidentifierparams- theHTTP parametersfor 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 specificationwith the given name.- Parameters:
name- thecookie specificationidentifier- 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 specswith the content of the map passed as a parameter.- Parameters:
map- cookie specs
-
lookup
public CookieSpecProvider lookup(java.lang.String name)
Deprecated.- Specified by:
lookupin interfaceLookup<CookieSpecProvider>
-
-