|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HttpParams
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.
DefaultedHttpParams| Method Summary | |
|---|---|
HttpParams |
copy()
Deprecated. (4.1) |
boolean |
getBooleanParameter(String name,
boolean defaultValue)
Returns a Boolean parameter value with the given name. |
double |
getDoubleParameter(String name,
double defaultValue)
Returns a Double parameter value with the given name. |
int |
getIntParameter(String name,
int defaultValue)
Returns an Integer parameter value with the given name. |
long |
getLongParameter(String name,
long defaultValue)
Returns a Long parameter value with the given name. |
Object |
getParameter(String name)
Obtains the value of the given parameter. |
boolean |
isParameterFalse(String name)
Checks if a boolean parameter is not set or false. |
boolean |
isParameterTrue(String name)
Checks if a boolean parameter is set to true. |
boolean |
removeParameter(String name)
Removes the parameter with the specified name. |
HttpParams |
setBooleanParameter(String name,
boolean value)
Assigns a Boolean to the parameter with the given name |
HttpParams |
setDoubleParameter(String name,
double value)
Assigns a Double to the parameter with the given name |
HttpParams |
setIntParameter(String name,
int value)
Assigns an Integer to the parameter with the given name |
HttpParams |
setLongParameter(String name,
long value)
Assigns a Long to the parameter with the given name |
HttpParams |
setParameter(String name,
Object value)
Assigns the value to the parameter with the given name. |
| Method Detail |
|---|
Object getParameter(String name)
name - the parent name.
null if the parameter is not set or if it
is explicitly set to nullsetParameter(String, Object)
HttpParams setParameter(String name,
Object value)
name - parameter namevalue - parameter value@Deprecated HttpParams copy()
boolean removeParameter(String name)
name - parameter name
long getLongParameter(String name,
long defaultValue)
Long parameter value with the given name.
If the parameter is not explicitly set, the default value is returned.
name - the parent name.defaultValue - the default value.
Long that represents the value of the parameter.setLongParameter(String, long)
HttpParams setLongParameter(String name,
long value)
Long to the parameter with the given name
name - parameter namevalue - parameter value
int getIntParameter(String name,
int defaultValue)
Integer parameter value with the given name.
If the parameter is not explicitly set, the default value is returned.
name - the parent name.defaultValue - the default value.
Integer that represents the value of the parameter.setIntParameter(String, int)
HttpParams setIntParameter(String name,
int value)
Integer to the parameter with the given name
name - parameter namevalue - parameter value
double getDoubleParameter(String name,
double defaultValue)
Double parameter value with the given name.
If the parameter is not explicitly set, the default value is returned.
name - the parent name.defaultValue - the default value.
Double that represents the value of the parameter.setDoubleParameter(String, double)
HttpParams setDoubleParameter(String name,
double value)
Double to the parameter with the given name
name - parameter namevalue - parameter value
boolean getBooleanParameter(String name,
boolean defaultValue)
Boolean parameter value with the given name.
If the parameter is not explicitly set, the default value is returned.
name - the parent name.defaultValue - the default value.
Boolean that represents the value of the parameter.setBooleanParameter(String, boolean)
HttpParams setBooleanParameter(String name,
boolean value)
Boolean to the parameter with the given name
name - parameter namevalue - parameter valueboolean isParameterTrue(String name)
true.
name - parameter name
falseboolean isParameterFalse(String name)
false.
name - parameter name
true
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||