org.apache.http.params.BasicHttpParams
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
Public Constructors
Public Methods
Protected Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
copy,
getBooleanParameter,
getDoubleParameter,
getIntParameter,
getLongParameter,
getParameter,
isParameterFalse,
isParameterSet,
isParameterTrue,
setBooleanParameter,
setDoubleParameter,
setIntParameter,
setLongParameter,
setParameter
Details
Fields
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 Methods
public
void
clear()
Removes all parameters from this collection.
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.
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
|
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
|