Top Description Fields Constructors Methods
org.apache.http.params

public Class BasicHttpParams

extends AbstractHttpParams
implements Serializable, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, java.io.Serializable
Known Direct Subclasses
org.apache.http.params.SyncBasicHttpParams
Annotations
@Deprecated
@Contract
threading:SAFE
Imports
org.apache.http.annotation.ThreadingBehavior, .Contract, java.io.Serializable, java.util.HashSet, .Map, .Set, java.util.concurrent.ConcurrentHashMap

Deprecated

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

Default implementation of HttpParams interface.

Please note access to the internal structures of this class is not synchronized and therefore this class may be thread-unsafe.

Since
4.0

Field Summary

Modifier and TypeField and Description
private final Map<String, Object>
parameters

Map of HTTP parameters that this collection contains.

private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Removes all parameters from this collection.

public Object
clone()

Overrides java.lang.Object.clone.

Clones the instance.
public HttpParams

Returns:

a new set of params holding a copy of the local parameters in this object.
copy
()

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

Deprecated as a consequence of HttpParams being deprecated.
Creates a copy of these parameters.
public void
copyParams(final HttpParams
the parameters to which to copy
target
)

Deprecated as a consequence of HttpParams being deprecated.
Copies the locally defined parameters to the argument parameters.
public Set<String>

Returns:

the names, as a Set<String>
getNames
()

Overrides org.apache.http.params.AbstractHttpParams.getNames.

Implements org.apache.http.params.HttpParamsNames.getNames.

Returns the current set of names.
public Object
getParameter(final String
the parent name.
name
)

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

Obtains the value of the given parameter.
public boolean

Returns:

true if parameter is defined and non-null
isParameterSet
(final String
parameter name
name
)

Is the parameter set?

public boolean

Returns:

true if parameter is defined and non-null
isParameterSetLocally
(final String
parameter name
name
)

Is the parameter set in this object?

public boolean
removeParameter(final String
parameter name
name
)

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

Removes the parameter with the specified name.
public HttpParams
setParameter(final String
parameter name
name
,
final Object
parameter value
value
)

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

Deprecated as a consequence of HttpParams being deprecated.
Assigns the value to the parameter with the given name.
public void
setParameters(final String[]
array of parameter names
names
,
final Object
parameter value
value
)

Assigns the value to all the parameter with the given names

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.apache.http.params.AbstractHttpParams:
getBooleanParametergetDoubleParametergetIntParametergetLongParameterisParameterFalseisParameterTruesetBooleanParametersetDoubleParametersetIntParametersetLongParameter

Field Detail

parametersback to summary
private final Map<String, Object> parameters

Map of HTTP parameters that this collection contains.

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

BasicHttpParamsback to summary
public BasicHttpParams()

Method Detail

clearback to summary
public void clear()

Removes all parameters from this collection.

cloneback to summary
public Object clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

Clones the instance. Uses copyParams(HttpParams) to copy the parameters.

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
Exceptions
CloneNotSupportedException:

Doc from java.lang.Object.clone.

if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.

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.

Creates a copy of these parameters. This implementation calls clone().

Returns:HttpParams

a new set of params holding a copy of the local parameters in this object.

Annotations
@Override
Exceptions
UnsupportedOperationException:
if the clone() fails
copyParamsback to summary
public void copyParams(final HttpParams target)

Deprecated

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

Copies the locally defined parameters to the argument parameters. This method is called from clone().

Parameters
target:HttpParams

the parameters to which to copy

Since
4.2
getNamesback to summary
public Set<String> getNames()

Overrides org.apache.http.params.AbstractHttpParams.getNames.

Implements org.apache.http.params.HttpParamsNames.getNames.

Returns the current set of names. Changes to the underlying HttpParams are not reflected in the set - it is a snapshot.

Returns:Set<String>

the names, as a Set<String>

Annotations
@Override
Since
4.2
getParameterback to summary
public Object getParameter(final String name)

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

Doc from org.apache.http.params.HttpParams.getParameter.

Obtains the value of the given parameter.

Parameters
name:String

the parent name.

Returns:Object

an object that represents the value of the parameter, null if the parameter is not set or if it is explicitly set to null

Annotations
@Override
isParameterSetback to summary
public boolean isParameterSet(final String name)

Is the parameter set?

Uses getParameter(String) (which is overrideable) to fetch the parameter value, if any.

Also @see isParameterSetLocally(String)

Parameters
name:String

parameter name

Returns:boolean

true if parameter is defined and non-null

isParameterSetLocallyback to summary
public boolean isParameterSetLocally(final String name)

Is the parameter set in this object?

The parameter value is fetched directly.

Also @see isParameterSet(String)

Parameters
name:String

parameter name

Returns:boolean

true if parameter is defined and non-null

removeParameterback to summary
public boolean removeParameter(final String name)

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

Doc from org.apache.http.params.HttpParams.removeParameter.

Removes the parameter with the specified name.

Parameters
name:String

parameter name

Returns:boolean

true if the parameter existed and has been removed, false else.

Annotations
@Override
setParameterback to summary
public HttpParams setParameter(final String name, final Object value)

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

Doc from org.apache.http.params.HttpParams.setParameter.

Deprecated

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

Assigns the value to the parameter with the given name.

Parameters
name:String

parameter name

value:Object

parameter value

Annotations
@Override
setParametersback to summary
public void setParameters(final String[] names, final Object value)

Assigns the value to all the parameter with the given names

Parameters
names:String[]

array of parameter names

value:Object

parameter value

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override