Top Description Fields Constructors Methods
org.apache.http.params

public final Class DefaultedHttpParams

extends AbstractHttpParams
Class Inheritance
Annotations
@Deprecated
Imports
java.util.HashSet, .Set, org.apache.http.util.Args

Deprecated

(4.3) use configuration classes provided 'org.apache.http.config' and 'org.apache.http.client.config'

HttpParams implementation that delegates resolution of a parameter to the given default HttpParams instance if the parameter is not present in the local one. The state of the local collection can be mutated, whereas the default collection is treated as read-only.
Since
4.0

Field Summary

Modifier and TypeField and Description
private final HttpParams
defaults

Deprecated as a consequence of HttpParams being deprecated.
private final HttpParams
local

Deprecated as a consequence of HttpParams being deprecated.

Constructor Summary

AccessConstructor and Description
public
DefaultedHttpParams(final HttpParams
the mutable set of HttpParams
local
,
final HttpParams
the default set of HttpParams, not mutated by this class
defaults
)

Deprecated as a consequence of HttpParams being deprecated.
Create the defaulted set of HttpParams.

Method Summary

Modifier and TypeMethod and Description
public HttpParams
copy()

Implements org.apache.http.params.HttpParams.copy.

Deprecated as a consequence of HttpParams being deprecated.
Creates a copy of the local collection with the same default
public Set<String>

Returns:

the names, as a Set<String>
getDefaultNames
()

Returns the current set of defaults names.

public HttpParams

Returns:

the default HttpParams collection
getDefaults
()

Deprecated as a consequence of HttpParams being deprecated.
public Set<String>

Returns:

the names, as a Set<String>
getLocalNames
()

Returns the current set of local names.

public Set<String>

Returns:

the combined set of names, as a Set<String>
getNames
()

Overrides org.apache.http.params.AbstractHttpParams.getNames.

Implements org.apache.http.params.HttpParamsNames.getNames.

Returns the current set of names from both the local and default HttpParams instances.
private Set<String>
getNames(final HttpParams params)

Deprecated as a consequence of HttpParams being deprecated.
public Object
getParameter(final String
the parent name.
name
)

Implements org.apache.http.params.HttpParams.getParameter.

Retrieves the value of the parameter from the local collection and, if the parameter is not set locally, delegates its resolution to the default collection.
public boolean
removeParameter(final String
parameter name
name
)

Implements org.apache.http.params.HttpParams.removeParameter.

Attempts to remove the parameter from the local collection.
public HttpParams
setParameter(final String
parameter name
name
,
final Object
parameter value
value
)

Implements org.apache.http.params.HttpParams.setParameter.

Deprecated as a consequence of HttpParams being deprecated.
Sets the parameter in the local collection.
Inherited from org.apache.http.params.AbstractHttpParams:
getBooleanParametergetDoubleParametergetIntParametergetLongParameterisParameterFalseisParameterTruesetBooleanParametersetDoubleParametersetIntParametersetLongParameter

Field Detail

defaultsback to summary
private final HttpParams defaults

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

localback to summary
private final HttpParams local

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Constructor Detail

DefaultedHttpParamsback to summary
public DefaultedHttpParams(final HttpParams local, final HttpParams defaults)

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Create the defaulted set of HttpParams.

Parameters
local:HttpParams

the mutable set of HttpParams

defaults:HttpParams

the default set of HttpParams, not mutated by this class

Method Detail

copyback to summary
public HttpParams copy()

Implements org.apache.http.params.HttpParams.copy.

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Creates a copy of the local collection with the same default

Returns:HttpParams

Doc from org.apache.http.params.HttpParams.copy.

a new set of parameters holding the same values as this one

Annotations
@Override
getDefaultNamesback to summary
public Set<String> getDefaultNames()

Returns the current set of defaults names. Changes to the underlying HttpParams are not reflected in the set - it is a snapshot.

Returns:Set<String>

the names, as a Set<String>

Exceptions
UnsupportedOperationException:
if the default HttpParams instance does not implement HttpParamsNames
Since
4.2
getDefaultsback to summary
public HttpParams getDefaults()

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Returns:HttpParams

the default HttpParams collection

getLocalNamesback to summary
public Set<String> getLocalNames()

Returns the current set of local names. Changes to the underlying HttpParams are not reflected in the set - it is a snapshot.

Returns:Set<String>

the names, as a Set<String>

Exceptions
UnsupportedOperationException:
if the local HttpParams instance does not implement HttpParamsNames
Since
4.2
getNamesback to summary
public Set<String> getNames()

Overrides org.apache.http.params.AbstractHttpParams.getNames.

Implements org.apache.http.params.HttpParamsNames.getNames.

Returns the current set of names from both the local and default HttpParams instances. Changes to the underlying HttpParams intances are not reflected in the set - it is a snapshot.

Returns:Set<String>

the combined set of names, as a Set<String>

Annotations
@Override
Exceptions
UnsupportedOperationException:
if either the local or default HttpParams instances do not implement HttpParamsNames
Since
4.2
getNamesback to summary
private Set<String> getNames(final HttpParams params)

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

getParameterback to summary
public Object getParameter(final String name)

Implements org.apache.http.params.HttpParams.getParameter.

Retrieves the value of the parameter from the local collection and, if the parameter is not set locally, delegates its resolution to the default collection.

Parameters
name:String

Doc from org.apache.http.params.HttpParams.getParameter.

the parent name.

Returns:Object

Doc from org.apache.http.params.HttpParams.getParameter.

an object that represents the value of the parameter, null if the parameter is not set or if it is explicitly set to null

Annotations
@Override
removeParameterback to summary
public boolean removeParameter(final String name)

Implements org.apache.http.params.HttpParams.removeParameter.

Attempts to remove the parameter from the local collection. This method does not modify the default collection.

Parameters
name:String

Doc from org.apache.http.params.HttpParams.removeParameter.

parameter name

Returns:boolean

Doc from org.apache.http.params.HttpParams.removeParameter.

true if the parameter existed and has been removed, false else.

Annotations
@Override
setParameterback to summary
public HttpParams setParameter(final String name, final Object value)

Implements org.apache.http.params.HttpParams.setParameter.

Deprecated

as a consequence of HttpParams being deprecated. See corresponding docs for further information.

Sets the parameter in the local collection. This method does not modify the default collection.

Parameters
name:String

Doc from org.apache.http.params.HttpParams.setParameter.

parameter name

value:Object

Doc from org.apache.http.params.HttpParams.setParameter.

parameter value

Annotations
@Override