@Deprecated public final class DefaultedHttpParams extends AbstractHttpParams
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.Constructor and Description |
---|
DefaultedHttpParams(HttpParams local,
HttpParams defaults)
Deprecated.
Create the defaulted set of HttpParams.
|
Modifier and Type | Method and Description |
---|---|
HttpParams |
copy()
Deprecated.
Creates a copy of the local collection with the same default
|
Set<String> |
getDefaultNames()
Deprecated.
Returns the current set of defaults names.
|
HttpParams |
getDefaults()
Deprecated.
|
Set<String> |
getLocalNames()
Deprecated.
Returns the current set of local names.
|
Set<String> |
getNames()
Deprecated.
Returns the current set of names
from both the local and default HttpParams instances.
|
Object |
getParameter(String name)
Deprecated.
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.
|
boolean |
removeParameter(String name)
Deprecated.
Attempts to remove the parameter from the local collection.
|
HttpParams |
setParameter(String name,
Object value)
Deprecated.
Sets the parameter in the local collection.
|
getBooleanParameter, getDoubleParameter, getIntParameter, getLongParameter, isParameterFalse, isParameterTrue, setBooleanParameter, setDoubleParameter, setIntParameter, setLongParameter
public DefaultedHttpParams(HttpParams local, HttpParams defaults)
local
- the mutable set of HttpParamsdefaults
- the default set of HttpParams, not mutated by this classpublic HttpParams copy()
public Object getParameter(String name)
name
- the parent name.null
if the parameter is not set or if it
is explicitly set to null
HttpParams.setParameter(String, Object)
public boolean removeParameter(String name)
name
- parameter namepublic HttpParams setParameter(String name, Object value)
name
- parameter namevalue
- parameter valuepublic HttpParams getDefaults()
public Set<String> getNames()
getNames
in interface HttpParamsNames
getNames
in class AbstractHttpParams
UnsupportedOperationException
- if either the local or default HttpParams instances do not implement HttpParamsNamespublic Set<String> getDefaultNames()
UnsupportedOperationException
- if the default HttpParams instance does not implement HttpParamsNamespublic Set<String> getLocalNames()
UnsupportedOperationException
- if the local HttpParams instance does not implement HttpParamsNamesCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.