• BlackBerry Dynamics
  • Runtime library for Android applications
  • 12.0.1.79
CookieSpecRegistry Class Reference

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

Description

Author
Oleg Kalnichevski
Mike Bowler
Since
4.0

Notice

The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.

/*
 * Copyright (C) 2006 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

Public Member Functions

synchronized void register (final String name, final CookieSpecFactory factory)
 Registers a com.good.gd.apache.http.cookie.CookieSpecFactory with the given identifier. More...
 
synchronized void unregister (final String id)
 Unregisters the com.good.gd.apache.http.cookie.CookieSpecFactory with the given ID. More...
 
synchronized CookieSpec getCookieSpec (final String name, final HttpParams params) throws IllegalStateException
 Gets the cookie specification with the given ID. More...
 
synchronized CookieSpec getCookieSpec (final String name) throws IllegalStateException
 Gets the cookie specification with the given name. More...
 
synchronized List< String > getSpecNames ()
 Obtains a list containing names of all registered cookie specs in their default order. More...
 
synchronized void setItems (final Map< String, CookieSpecFactory > map)
 Populates the internal collection of registered cookie specs with the content of the map passed as a parameter. More...
 

Member Function Documentation

◆ register()

synchronized void register ( final String  name,
final CookieSpecFactory  factory 
)

If a specification with the given name already exists it will be overridden. This nameis the same one used to retrieve the com.good.gd.apache.http.cookie.CookieSpecFactory from (java.lang.String) .

Parameters
namethe identifier for this specification
factorythe com.good.gd.apache.http.cookie.CookieSpecFactory class to register
See also
getCookieSpec(java.lang.String)

◆ unregister()

synchronized void unregister ( final String  id)
Parameters
idthe identifier of the cookie specification to unregister

◆ getCookieSpec() [1/2]

synchronized CookieSpec getCookieSpec ( final String  name,
final HttpParams  params 
) throws IllegalStateException
Parameters
namethe cookie specification identifier
paramsthe HTTP parameters for the cookie specification.
Returns
cookie specification
Exceptions
IllegalStateExceptionif a policy with the given name cannot be found

◆ getCookieSpec() [2/2]

synchronized CookieSpec getCookieSpec ( final String  name) throws IllegalStateException
Parameters
namethe cookie specification identifier
Returns
cookie specification
Exceptions
IllegalStateExceptionif a policy with the given name cannot be found

◆ getSpecNames()

synchronized List<String> getSpecNames ( )

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

synchronized void setItems ( final Map< String, CookieSpecFactory map)
Parameters
mapcookie specs