English | Site Directory

Android - An Open Handset Alliance Project

org.apache.http.params
public class

org.apache.http.params.BasicHttpParams

java.lang.Object
org.apache.http.params.AbstractHttpParams HttpParams
org.apache.http.params.BasicHttpParams Serializable HttpLinkedParams

This class represents a collection of HTTP protocol parameters. Protocol parameters may be linked together to form a hierarchy. If a particular parameter value has not been explicitly defined in the collection itself, its value will be drawn from the parent collection of parameters.

Summary

Fields

protected      HttpParams  defaults  The optional set of default values to defer to. 

Public Constructors

          BasicHttpParams(HttpParams defaults)
Creates a new collection of parameters with the given parent.
          BasicHttpParams()

Public Methods

        void  clear()
Removes all parameters from this collection.
        HttpParams  copy()
Creates a copy of these parameters.
        HttpParams  getDefaults()
Obtains default parameters, if set.
        Object  getParameter(String name)
Returns a parameter value with the given name.
        boolean  isParameterSet(String name)
Returns true if the parameter is set at any level, false otherwise.
        boolean  isParameterSetLocally(String name)
WARNING: This method is not part of the API.
        void  setDefaults(HttpParams params)
Provides default parameters.
        HttpParams  setParameter(String name, Object value)
Assigns the value to the parameter with the given name
        void  setParameters(String[] names, Object value)
Assigns the value to all the parameter with the given names

Protected Methods

        void  copyParams(HttpParams target)
Copies the locally defined parameters to the argument parameters.
Methods inherited from class org.apache.http.params.AbstractHttpParams
Methods inherited from class java.lang.Object
Methods inherited from interface org.apache.http.params.HttpLinkedParams
Methods inherited from interface org.apache.http.params.HttpParams

Details

Fields

protected HttpParams defaults

The optional set of default values to defer to.

Public Constructors

public BasicHttpParams(HttpParams defaults)

Creates a new collection of parameters with the given parent. The collection will defer to its parent for a default value if a particular parameter is not explicitly set in the collection itself.

Parameters

defaults the parent collection to defer to, if a parameter is not explictly set in the collection itself.

public BasicHttpParams()

Public Methods

public void clear()

Removes all parameters from this collection.

public HttpParams copy()

Creates a copy of these parameters. The implementation here instantiates BasicHttpParams with the same default parameters as this object, then calls copyParams(HttpParams) to populate the copy.
Derived classes which have to change the class that is instantiated can override this method here. Derived classes which have to change how the copy is populated can override copyParams(HttpParams).

Returns

  • a new set of params holding a copy of the local parameters in this object. Defaults parameters available via getDefaults() are not copied.

public HttpParams getDefaults()

Obtains default parameters, if set.

Returns

  • the defaults, or null

public Object getParameter(String name)

Returns a parameter value with the given name. If the parameter is not explicitly defined in this collection, its value will be drawn from a higer level collection at which this parameter is defined. If the parameter is not explicitly set anywhere up the hierarchy, null value is returned.

public boolean isParameterSet(String name)

Returns true if the parameter is set at any level, false otherwise.

public boolean isParameterSetLocally(String name)

WARNING: This method is not part of the API. It is intended for internal use by the HTTP Components framework. Use with caution.

public void setDefaults(HttpParams params)

Provides default parameters.

Parameters

params the new defaults, or null to unset

public HttpParams setParameter(String name, Object value)

Assigns the value to the parameter with the given name

public void setParameters(String[] names, Object value)

Assigns the value to all the parameter with the given names

Parameters

names array of parameter name
value parameter value

Protected Methods

protected void copyParams(HttpParams target)

Copies the locally defined parameters to the argument parameters. Default parameters accessible via getDefaults() are not copied. This method is called from copy().

Parameters

target the parameters to which to copy
Build m5-rc15i - 10 Jun 2008 13:54