Package org.apache.http.params
Class DefaultedHttpParams
- java.lang.Object
-
- org.apache.http.params.AbstractHttpParams
-
- org.apache.http.params.DefaultedHttpParams
-
- All Implemented Interfaces:
HttpParams,HttpParamsNames
@Deprecated public final class DefaultedHttpParams extends AbstractHttpParams
Deprecated.(4.3) use configuration classes provided 'org.apache.http.config' and 'org.apache.http.client.config'HttpParamsimplementation that delegates resolution of a parameter to the given defaultHttpParamsinstance 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
-
-
Constructor Summary
Constructors Constructor Description DefaultedHttpParams(HttpParams local, HttpParams defaults)Deprecated.Create the defaulted set of HttpParams.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description HttpParamscopy()Deprecated.Creates a copy of the local collection with the same defaultjava.util.Set<java.lang.String>getDefaultNames()Deprecated.Returns the current set of defaults names.HttpParamsgetDefaults()Deprecated.java.util.Set<java.lang.String>getLocalNames()Deprecated.Returns the current set of local names.java.util.Set<java.lang.String>getNames()Deprecated.Returns the current set of names from both the local and default HttpParams instances.java.lang.ObjectgetParameter(java.lang.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.booleanremoveParameter(java.lang.String name)Deprecated.Attempts to remove the parameter from the local collection.HttpParamssetParameter(java.lang.String name, java.lang.Object value)Deprecated.Sets the parameter in the local collection.-
Methods inherited from class org.apache.http.params.AbstractHttpParams
getBooleanParameter, getDoubleParameter, getIntParameter, getLongParameter, isParameterFalse, isParameterTrue, setBooleanParameter, setDoubleParameter, setIntParameter, setLongParameter
-
-
-
-
Constructor Detail
-
DefaultedHttpParams
public DefaultedHttpParams(HttpParams local, HttpParams defaults)
Deprecated.Create the defaulted set of HttpParams.- Parameters:
local- the mutable set of HttpParamsdefaults- the default set of HttpParams, not mutated by this class
-
-
Method Detail
-
copy
public HttpParams copy()
Deprecated.Creates a copy of the local collection with the same default- Returns:
- a new set of parameters holding the same values as this one
-
getParameter
public java.lang.Object getParameter(java.lang.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.- Parameters:
name- the parent name.- Returns:
- an object that represents the value of the parameter,
nullif the parameter is not set or if it is explicitly set tonull - See Also:
HttpParams.setParameter(String, Object)
-
removeParameter
public boolean removeParameter(java.lang.String name)
Deprecated.Attempts to remove the parameter from the local collection. This method does not modify the default collection.- Parameters:
name- parameter name- Returns:
- true if the parameter existed and has been removed, false else.
-
setParameter
public HttpParams setParameter(java.lang.String name, java.lang.Object value)
Deprecated.Sets the parameter in the local collection. This method does not modify the default collection.- Parameters:
name- parameter namevalue- parameter value
-
getDefaults
public HttpParams getDefaults()
Deprecated.- Returns:
- the default HttpParams collection
-
getNames
public java.util.Set<java.lang.String> getNames()
Deprecated.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.- Specified by:
getNamesin interfaceHttpParamsNames- Overrides:
getNamesin classAbstractHttpParams- Returns:
- the combined set of names, as a Set<String>
- Throws:
java.lang.UnsupportedOperationException- if either the local or default HttpParams instances do not implement HttpParamsNames- Since:
- 4.2
-
getDefaultNames
public java.util.Set<java.lang.String> getDefaultNames()
Deprecated.Returns the current set of defaults names. Changes to the underlying HttpParams are not reflected in the set - it is a snapshot.- Returns:
- the names, as a Set<String>
- Throws:
java.lang.UnsupportedOperationException- if the default HttpParams instance does not implement HttpParamsNames- Since:
- 4.2
-
getLocalNames
public java.util.Set<java.lang.String> getLocalNames()
Deprecated.Returns the current set of local names. Changes to the underlying HttpParams are not reflected in the set - it is a snapshot.- Returns:
- the names, as a Set<String>
- Throws:
java.lang.UnsupportedOperationException- if the local HttpParams instance does not implement HttpParamsNames- Since:
- 4.2
-
-