Top Description Fields Constructors Methods
org.apache.http.impl.client

public Class ClientParamsStack

extends AbstractHttpParams
Class Inheritance
Annotations
@Deprecated
Imports
org.apache.http.params.AbstractHttpParams, .HttpParams, org.apache.http.util.Args

Deprecated

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

Represents a stack of parameter collections. When retrieving a parameter, the stack is searched in a fixed order and the first match returned. Setting parameters via the stack is not supported. To minimize overhead, the stack has a fixed size and does not maintain an internal array. The supported stack entries, sorted by increasing priority, are:
  1. Application parameters: expected to be the same for all clients used by an application. These provide "global", that is application-wide, defaults.
  2. Client parameters: specific to an instance of HttpClient. These provide client specific defaults.
  3. Request parameters: specific to a single request execution. For overriding client and global defaults.
  4. Override parameters: specific to an instance of HttpClient. These can be used to set parameters that cannot be overridden on a per-request basis.
Each stack entry may be null. That is preferable over an empty params collection, since it avoids searching the empty collection when looking up parameters.
Since
4.0

Field Summary

Modifier and TypeField and Description
protected final HttpParams
applicationParams

The application parameter collection, or null.

protected final HttpParams
clientParams

The client parameter collection, or null.

protected final HttpParams
overrideParams

The override parameter collection, or null.

protected final HttpParams
requestParams

The request parameter collection, or null.

Constructor Summary

AccessConstructor and Description
public
ClientParamsStack(final HttpParams
application parameters, or null
aparams
,
final HttpParams
client parameters, or null
cparams
,
final HttpParams
request parameters, or null
rparams
,
final HttpParams
override parameters, or null
oparams
)

Deprecated as a consequence of HttpParams being deprecated.
Creates a new parameter stack from elements.
public
ClientParamsStack(final ClientParamsStack
the stack to copy
stack
)

Deprecated as a consequence of ClientParamsStack being deprecated.
Creates a copy of a parameter stack.
public
ClientParamsStack(final ClientParamsStack
the stack to modify
stack
,
final HttpParams
application parameters, or null
aparams
,
final HttpParams
client parameters, or null
cparams
,
final HttpParams
request parameters, or null
rparams
,
final HttpParams
override parameters, or null
oparams
)

Deprecated as a consequence of ClientParamsStack and HttpParams being deprecated.
Creates a modified copy of a parameter stack.

Method Summary

Modifier and TypeMethod and Description
public HttpParams

Returns:

this parameter stack
copy
()

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

Deprecated as a consequence of HttpParams being deprecated.
Does not copy parameters.
public final HttpParams

Returns:

the application parameters, or null
getApplicationParams
()

Deprecated as a consequence of HttpParams being deprecated.
Obtains the application parameters of this stack.
public final HttpParams

Returns:

the client parameters, or null
getClientParams
()

Deprecated as a consequence of HttpParams being deprecated.
Obtains the client parameters of this stack.
public final HttpParams

Returns:

the override parameters, or null
getOverrideParams
()

Deprecated as a consequence of HttpParams being deprecated.
Obtains the override parameters of this stack.
public Object

Returns:

the highest-priority value for that parameter, or null if it is not set anywhere in this stack
getParameter
(final String
the name of the parameter to obtain
name
)

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

Obtains a parameter from this stack.
public final HttpParams

Returns:

the request parameters, or null
getRequestParams
()

Deprecated as a consequence of HttpParams being deprecated.
Obtains the request parameters of this stack.
public boolean

Returns:

nothing
removeParameter
(final String
ignored
name
)

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

Does not remove a parameter.
public HttpParams

Returns:

nothing
setParameter
(final String
ignored
name
,
final Object
ignored
value
)

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

Deprecated as a consequence of HttpParams being deprecated.
Does not set a parameter.
Inherited from org.apache.http.params.AbstractHttpParams:
getBooleanParametergetDoubleParametergetIntParametergetLongParametergetNamesisParameterFalseisParameterTruesetBooleanParametersetDoubleParametersetIntParametersetLongParameter

Field Detail

applicationParamsback to summary
protected final HttpParams applicationParams

Deprecated

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

The application parameter collection, or null.

clientParamsback to summary
protected final HttpParams clientParams

Deprecated

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

The client parameter collection, or null.

overrideParamsback to summary
protected final HttpParams overrideParams

Deprecated

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

The override parameter collection, or null.

requestParamsback to summary
protected final HttpParams requestParams

Deprecated

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

The request parameter collection, or null.

Constructor Detail

ClientParamsStackback to summary
public ClientParamsStack(final HttpParams aparams, final HttpParams cparams, final HttpParams rparams, final HttpParams oparams)

Deprecated

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

Creates a new parameter stack from elements. The arguments will be stored as-is, there is no copying to prevent modification.

Parameters
aparams:HttpParams

application parameters, or null

cparams:HttpParams

client parameters, or null

rparams:HttpParams

request parameters, or null

oparams:HttpParams

override parameters, or null

ClientParamsStackback to summary
public ClientParamsStack(final ClientParamsStack stack)

Deprecated

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

Creates a copy of a parameter stack. The new stack will have the exact same entries as the argument stack. There is no copying of parameters.

Parameters
stack:ClientParamsStack

the stack to copy

ClientParamsStackback to summary
public ClientParamsStack(final ClientParamsStack stack, final HttpParams aparams, final HttpParams cparams, final HttpParams rparams, final HttpParams oparams)

Deprecated

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

Creates a modified copy of a parameter stack. The new stack will contain the explicitly passed elements. For elements where the explicit argument is null, the corresponding element from the argument stack is used. There is no copying of parameters.

Parameters
stack:ClientParamsStack

the stack to modify

aparams:HttpParams

application parameters, or null

cparams:HttpParams

client parameters, or null

rparams:HttpParams

request parameters, or null

oparams:HttpParams

override parameters, or null

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.

Does not copy parameters. Parameter stacks are lightweight objects, expected to be instantiated as needed and to be used only in a very specific context. On top of that, they are read-only. The typical copy operation to prevent accidental modification of parameters passed by the application to a framework object is therefore pointless and disabled. Create a new stack if you really need a copy.

Derived classes may change this behavior.

Returns:HttpParams

this parameter stack

Annotations
@Override
getApplicationParamsback to summary
public final HttpParams getApplicationParams()

Deprecated

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

Obtains the application parameters of this stack.

Returns:HttpParams

the application parameters, or null

getClientParamsback to summary
public final HttpParams getClientParams()

Deprecated

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

Obtains the client parameters of this stack.

Returns:HttpParams

the client parameters, or null

getOverrideParamsback to summary
public final HttpParams getOverrideParams()

Deprecated

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

Obtains the override parameters of this stack.

Returns:HttpParams

the override parameters, or null

getParameterback to summary
public Object getParameter(final String name)

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

Obtains a parameter from this stack. See class comment for search order.

Parameters
name:String

the name of the parameter to obtain

Returns:Object

the highest-priority value for that parameter, or null if it is not set anywhere in this stack

Annotations
@Override
getRequestParamsback to summary
public final HttpParams getRequestParams()

Deprecated

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

Obtains the request parameters of this stack.

Returns:HttpParams

the request parameters, or null

removeParameterback to summary
public boolean removeParameter(final String name)

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

Does not remove a parameter. Parameter stacks are read-only. It is possible, though discouraged, to access and modify specific stack entries. Derived classes may change this behavior.

Parameters
name:String

ignored

Returns:boolean

nothing

Annotations
@Override
Exceptions
UnsupportedOperationException:
always
setParameterback to summary
public HttpParams setParameter(final String name, final Object value) throws UnsupportedOperationException

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

Deprecated

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

Does not set a parameter. Parameter stacks are read-only. It is possible, though discouraged, to access and modify specific stack entries. Derived classes may change this behavior.

Parameters
name:String

ignored

value:Object

ignored

Returns:HttpParams

nothing

Annotations
@Override
Exceptions
UnsupportedOperationException:
always