ClientParamsStack (Apache HttpClient 4.5.13 API)
Date: 2020-10-03

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.impl.client
Class ClientParamsStack

    java.lang.Object
      org.apache.http.params.AbstractHttpParams
          org.apache.http.impl.client.ClientParamsStack

All Implemented Interfaces:
  org.apache.http.params.HttpParams, org.apache.http.params.HttpParamsNames

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

    @Deprecated
    public class ClientParamsStack

extends org.apache.http.params.AbstractHttpParams

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
`protected org.apache.http.params.HttpParams` | `applicationParams` Deprecated. The application parameter collection, or `null`.
`protected org.apache.http.params.HttpParams` | `clientParams` Deprecated. The client parameter collection, or `null`.
`protected org.apache.http.params.HttpParams` | `overrideParams` Deprecated. The override parameter collection, or `null`.
`protected org.apache.http.params.HttpParams` | `requestParams` Deprecated. The request parameter collection, or `null`.

Constructor Summary
`ClientParamsStack(ClientParamsStack stack)` Deprecated. Creates a copy of a parameter stack.
`ClientParamsStack(ClientParamsStack stack, org.apache.http.params.HttpParams aparams, org.apache.http.params.HttpParams cparams, org.apache.http.params.HttpParams rparams, org.apache.http.params.HttpParams oparams)` Deprecated. Creates a modified copy of a parameter stack.
`ClientParamsStack(org.apache.http.params.HttpParams aparams, org.apache.http.params.HttpParams cparams, org.apache.http.params.HttpParams rparams, org.apache.http.params.HttpParams oparams)` Deprecated. Creates a new parameter stack from elements.

Method Summary
`org.apache.http.params.HttpParams` | `copy()` Deprecated. Does not copy parameters.
`org.apache.http.params.HttpParams` | `getApplicationParams()` Deprecated. Obtains the application parameters of this stack.
`org.apache.http.params.HttpParams` | `getClientParams()` Deprecated. Obtains the client parameters of this stack.
`org.apache.http.params.HttpParams` | `getOverrideParams()` Deprecated. Obtains the override parameters of this stack.
`Object` | `getParameter(String name)` Deprecated. Obtains a parameter from this stack.
`org.apache.http.params.HttpParams` | `getRequestParams()` Deprecated. Obtains the request parameters of this stack.
`boolean` | `removeParameter(String name)` Deprecated. Does not remove a parameter.
`org.apache.http.params.HttpParams` | `setParameter(String name, Object value)` Deprecated. Does not set a parameter.

Methods inherited from class org.apache.http.params.AbstractHttpParams
`getBooleanParameter, getDoubleParameter, getIntParameter, getLongParameter, getNames, isParameterFalse, isParameterTrue, setBooleanParameter, setDoubleParameter, setIntParameter, setLongParameter`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### applicationParams

    protected final org.apache.http.params.HttpParams applicationParams

  Deprecated.
  The application parameter collection, or `null`.

### clientParams

    protected final org.apache.http.params.HttpParams clientParams

  Deprecated.
  The client parameter collection, or `null`.

### requestParams

    protected final org.apache.http.params.HttpParams requestParams

  Deprecated.
  The request parameter collection, or `null`.

### overrideParams

    protected final org.apache.http.params.HttpParams overrideParams

  Deprecated.
  The override parameter collection, or `null`.

Constructor Detail

### ClientParamsStack

    public ClientParamsStack(org.apache.http.params.HttpParams aparams,
                             org.apache.http.params.HttpParams cparams,
                             org.apache.http.params.HttpParams rparams,
                             org.apache.http.params.HttpParams oparams)

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

  Parameters:
    `aparams` - application parameters, or `null`
    `cparams` - client parameters, or `null`
    `rparams` - request parameters, or `null`
    `oparams` - override parameters, or `null`

### ClientParamsStack

    public ClientParamsStack(ClientParamsStack stack)

  Deprecated.
  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` - the stack to copy

### ClientParamsStack

    public ClientParamsStack(ClientParamsStack stack,
                             org.apache.http.params.HttpParams aparams,
                             org.apache.http.params.HttpParams cparams,
                             org.apache.http.params.HttpParams rparams,
                             org.apache.http.params.HttpParams oparams)

  Deprecated.
  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` - the stack to modify
    `aparams` - application parameters, or `null`
    `cparams` - client parameters, or `null`
    `rparams` - request parameters, or `null`
    `oparams` - override parameters, or `null`

Method Detail

### getApplicationParams

    public final org.apache.http.params.HttpParams getApplicationParams()

  Deprecated.
  Obtains the application parameters of this stack.

  Returns:
    the application parameters, or `null`

### getClientParams

    public final org.apache.http.params.HttpParams getClientParams()

  Deprecated.
  Obtains the client parameters of this stack.

  Returns:
    the client parameters, or `null`

### getRequestParams

    public final org.apache.http.params.HttpParams getRequestParams()

  Deprecated.
  Obtains the request parameters of this stack.

  Returns:
    the request parameters, or `null`

### getOverrideParams

    public final org.apache.http.params.HttpParams getOverrideParams()

  Deprecated.
  Obtains the override parameters of this stack.

  Returns:
    the override parameters, or `null`

### getParameter

    public Object getParameter(String name)

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

  Parameters:
    `name` - the name of the parameter to obtain
  Returns:
    the highest-priority value for that parameter, or `null` if it is not set anywhere in this stack

### setParameter

    public org.apache.http.params.HttpParams setParameter(String name,
                                                          Object value)
                                                   throws UnsupportedOperationException

  Deprecated.
  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` - ignored
    `value` - ignored
  Returns:
    nothing
  Throws:
    `UnsupportedOperationException` - always

### removeParameter

    public boolean removeParameter(String name)

  Deprecated.
  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` - ignored
  Returns:
    nothing
  Throws:
    `UnsupportedOperationException` - always

### copy

    public org.apache.http.params.HttpParams copy()

  Deprecated.
  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:
    `this` parameter stack

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999–2020 The Apache Software Foundation. All rights reserved.