Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public final class

CookieSpecRegistry

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

Class Overview

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

Summary

Public Constructors
CookieSpecRegistry ()
Public Methods
synchronized CookieSpec getCookieSpec ( String name)
Gets the cookie specification with the given name.
synchronized CookieSpec getCookieSpec ( String name, HttpParams params)
Gets the cookie specification with the given ID.
synchronized List < String > getSpecNames ()
Obtains a list containing names of all registered cookie specs in their default order.
synchronized void register ( String name, CookieSpecFactory factory)
Registers a CookieSpecFactory with the given identifier.
synchronized void )">setItems ( Map < String CookieSpecFactory > map)
Populates the internal collection of registered cookie specs with the content of the map passed as a parameter.
synchronized void unregister ( String id)
Unregisters the CookieSpecFactory with the given ID.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CookieSpecRegistry ()

Added in API level 1

Public Methods

public synchronized CookieSpec getCookieSpec ( String name)

Added in API level 1

Gets the cookie specification with the given name.

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

public synchronized CookieSpec getCookieSpec ( String name, HttpParams params)

Added in API level 1

Gets the cookie specification with the given ID.

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

public synchronized List < String > getSpecNames ()

Added in API level 1

Obtains a list containing names of all registered cookie specs in their default order. 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

public synchronized void register ( String name, CookieSpecFactory factory)

Added in API level 1

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
)">

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

Added in API level 1

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

Parameters
map cookie specs

public synchronized void unregister ( String id)

Added in API level 1

Unregisters the CookieSpecFactory with the given ID.

Parameters
id the identifier of the cookie specification to unregister