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:
-
Application parameters: expected to be the same for all clients used by an application. These provide "global", that is application-wide, defaults.
-
Client parameters: specific to an instance of HttpClient . These provide client specific defaults.
-
Request parameters: specific to a single request execution. For overriding client and global defaults.
-
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.
- Author
- Roland Weber
- Version
- Revision
- 673450
Notice
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
|
| ClientParamsStack (HttpParams aparams, HttpParams cparams, HttpParams rparams, HttpParams oparams) |
| Creates a new parameter stack from elements. More...
|
|
| ClientParamsStack (ClientParamsStack stack) |
| Creates a copy of a parameter stack. More...
|
|
| ClientParamsStack (ClientParamsStack stack, HttpParams aparams, HttpParams cparams, HttpParams rparams, HttpParams oparams) |
| Creates a modified copy of a parameter stack. More...
|
|
final HttpParams | getApplicationParams () |
| Obtains the application parameters of this stack. More...
|
|
final HttpParams | getClientParams () |
| Obtains the client parameters of this stack. More...
|
|
final HttpParams | getRequestParams () |
| Obtains the request parameters of this stack. More...
|
|
final HttpParams | getOverrideParams () |
| Obtains the override parameters of this stack. More...
|
|
Object | getParameter (String name) |
| Obtains a parameter from this stack. More...
|
|
HttpParams | setParameter (String name, Object value) throws UnsupportedOperationException |
| Does not set a parameter. More...
|
|
boolean | removeParameter (String name) |
| Does not remove a parameter. More...
|
|
HttpParams | copy () |
| Does not copy parameters. More...
|
|
long | getLongParameter (final String name, long defaultValue) |
| Returns a Long parameter value with the given name. More...
|
|
HttpParams | setLongParameter (final String name, long value) |
| Assigns a Long to the parameter with the given name. More...
|
|
int | getIntParameter (final String name, int defaultValue) |
| Returns an Integer parameter value with the given name. More...
|
|
HttpParams | setIntParameter (final String name, int value) |
| Assigns an Integer to the parameter with the given name. More...
|
|
double | getDoubleParameter (final String name, double defaultValue) |
| Returns a Double parameter value with the given name. More...
|
|
HttpParams | setDoubleParameter (final String name, double value) |
| Assigns a Double to the parameter with the given name. More...
|
|
boolean | getBooleanParameter (final String name, boolean defaultValue) |
| Returns a Boolean parameter value with the given name. More...
|
|
HttpParams | setBooleanParameter (final String name, boolean value) |
| Assigns a Boolean to the parameter with the given name. More...
|
|
boolean | isParameterTrue (final String name) |
| Checks if a boolean parameter is set to true . More...
|
|
boolean | isParameterFalse (final String name) |
| Checks if a boolean parameter is not set or false . More...
|
|