Top Description Methods
org.apache.http.params

public Interface HttpParams

Known Direct Implementers
org.apache.http.params.AbstractHttpParams
Annotations
@Deprecated

Deprecated

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

HttpParams interface represents a collection of immutable values that define a runtime behavior of a component. HTTP parameters should be simple objects: integers, doubles, strings, collections and objects that remain immutable at runtime. HttpParams is expected to be used in 'write once - read many' mode. Once initialized, HTTP parameters are not expected to mutate in the course of HTTP message processing.

The purpose of this interface is to define a behavior of other components. Usually each complex component has its own HTTP parameter collection.

Instances of this interface can be linked together to form a hierarchy. In the simplest form one set of parameters can use content of another one to obtain default values of parameters not present in the local set.

Since
4.0

Method Summary

Modifier and TypeMethod and Description
public HttpParams

Returns:

a new set of parameters holding the same values as this one
copy
()

Deprecated as a consequence of HttpParams being deprecated.
Creates a copy of these parameters.
public boolean

Returns:

a Boolean that represents the value of the parameter.
getBooleanParameter
(String
the parent name.
name
,
boolean
the default value.
defaultValue
)

Returns a Boolean parameter value with the given name.

public double

Returns:

a Double that represents the value of the parameter.
getDoubleParameter
(String
the parent name.
name
,
double
the default value.
defaultValue
)

Returns a Double parameter value with the given name.

public int

Returns:

a Integer that represents the value of the parameter.
getIntParameter
(String
the parent name.
name
,
int
the default value.
defaultValue
)

Returns an Integer parameter value with the given name.

public long

Returns:

a Long that represents the value of the parameter.
getLongParameter
(String
the parent name.
name
,
long
the default value.
defaultValue
)

Returns a Long parameter value with the given name.

public Object

Returns:

an object that represents the value of the parameter, null if the parameter is not set or if it is explicitly set to null
getParameter
(String
the parent name.
name
)

Obtains the value of the given parameter.

public boolean

Returns:

true if the parameter is either not set or set to value false, false if it is set to true
isParameterFalse
(String
parameter name
name
)

Checks if a boolean parameter is not set or false.

public boolean

Returns:

true if the parameter is set to value true, false if it is not set or set to false
isParameterTrue
(String
parameter name
name
)

Checks if a boolean parameter is set to true.

public boolean

Returns:

true if the parameter existed and has been removed, false else.
removeParameter
(String
parameter name
name
)

Removes the parameter with the specified name.

public HttpParams
setBooleanParameter(String
parameter name
name
,
boolean
parameter value
value
)

Deprecated as a consequence of HttpParams being deprecated.
Assigns a Boolean to the parameter with the given name
public HttpParams
setDoubleParameter(String
parameter name
name
,
double
parameter value
value
)

Deprecated as a consequence of HttpParams being deprecated.
Assigns a Double to the parameter with the given name
public HttpParams
setIntParameter(String
parameter name
name
,
int
parameter value
value
)

Deprecated as a consequence of HttpParams being deprecated.
Assigns an Integer to the parameter with the given name
public HttpParams
setLongParameter(String
parameter name
name
,
long
parameter value
value
)

Deprecated as a consequence of HttpParams being deprecated.
Assigns a Long to the parameter with the given name
public HttpParams
setParameter(String
parameter name
name
,
Object
parameter value
value
)

Deprecated as a consequence of HttpParams being deprecated.
Assigns the value to the parameter with the given name.

Method Detail

copyback to summary
public HttpParams copy()

Deprecated

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

Creates a copy of these parameters.

Returns:HttpParams

a new set of parameters holding the same values as this one

getBooleanParameterback to summary
public boolean getBooleanParameter(String name, boolean defaultValue)

Returns a Boolean parameter value with the given name. If the parameter is not explicitly set, the default value is returned.

Parameters
name:String

the parent name.

defaultValue:boolean

the default value.

Returns:boolean

a Boolean that represents the value of the parameter.

See Also
setBooleanParameter(String, boolean)
getDoubleParameterback to summary
public double getDoubleParameter(String name, double defaultValue)

Returns a Double parameter value with the given name. If the parameter is not explicitly set, the default value is returned.

Parameters
name:String

the parent name.

defaultValue:double

the default value.

Returns:double

a Double that represents the value of the parameter.

See Also
setDoubleParameter(String, double)
getIntParameterback to summary
public int getIntParameter(String name, int defaultValue)

Returns an Integer parameter value with the given name. If the parameter is not explicitly set, the default value is returned.

Parameters
name:String

the parent name.

defaultValue:int

the default value.

Returns:int

a Integer that represents the value of the parameter.

See Also
setIntParameter(String, int)
getLongParameterback to summary
public long getLongParameter(String name, long defaultValue)

Returns a Long parameter value with the given name. If the parameter is not explicitly set, the default value is returned.

Parameters
name:String

the parent name.

defaultValue:long

the default value.

Returns:long

a Long that represents the value of the parameter.

See Also
setLongParameter(String, long)
getParameterback to summary
public Object getParameter(String name)

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

See Also
setParameter(String, Object)
isParameterFalseback to summary
public boolean isParameterFalse(String name)

Checks if a boolean parameter is not set or false.

Parameters
name:String

parameter name

Returns:boolean

true if the parameter is either not set or set to value false, false if it is set to true

isParameterTrueback to summary
public boolean isParameterTrue(String name)

Checks if a boolean parameter is set to true.

Parameters
name:String

parameter name

Returns:boolean

true if the parameter is set to value true, false if it is not set or set to false

removeParameterback to summary
public boolean removeParameter(String name)

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.

setBooleanParameterback to summary
public HttpParams setBooleanParameter(String name, boolean value)

Deprecated

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

Assigns a Boolean to the parameter with the given name

Parameters
name:String

parameter name

value:boolean

parameter value

setDoubleParameterback to summary
public HttpParams setDoubleParameter(String name, double value)

Deprecated

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

Assigns a Double to the parameter with the given name

Parameters
name:String

parameter name

value:double

parameter value

setIntParameterback to summary
public HttpParams setIntParameter(String name, int value)

Deprecated

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

Assigns an Integer to the parameter with the given name

Parameters
name:String

parameter name

value:int

parameter value

setLongParameterback to summary
public HttpParams setLongParameter(String name, long value)

Deprecated

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

Assigns a Long to the parameter with the given name

Parameters
name:String

parameter name

value:long

parameter value

setParameterback to summary
public HttpParams setParameter(String name, Object value)

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