Build 1.0_r1(from source)

org.apache.http.params
Class BasicHttpParams

java.lang.Object
  extended by org.apache.http.params.AbstractHttpParams
      extended by org.apache.http.params.BasicHttpParams
All Implemented Interfaces:
Serializable, Cloneable, HttpParams

public final class BasicHttpParams
extends AbstractHttpParams
implements Serializable, Cloneable

This class represents a collection of HTTP protocol parameters. Protocol parameters may be linked together to form a hierarchy. If a particular parameter value has not been explicitly defined in the collection itself, its value will be drawn from the parent collection of parameters.

See Also:
Serialized Form

Constructor Summary
BasicHttpParams()
           
 
Method Summary
 void clear()
          Removes all parameters from this collection.
 Object clone()
          Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
 HttpParams copy()
          Creates a copy of these parameters.
protected  void copyParams(HttpParams target)
          Copies the locally defined parameters to the argument parameters.
 Object getParameter(String name)
          Obtains the value of the given parameter.
 boolean isParameterSet(String name)
           
 boolean isParameterSetLocally(String name)
           
 boolean removeParameter(String name)
          Removes the parameter with the specified name.
 HttpParams setParameter(String name, Object value)
          Assigns the value to the parameter with the given name.
 void setParameters(String[] names, Object value)
          Assigns the value to all the parameter with the given names
 
Methods inherited from class org.apache.http.params.AbstractHttpParams
getBooleanParameter, getDoubleParameter, getIntParameter, getLongParameter, isParameterFalse, isParameterTrue, setBooleanParameter, setDoubleParameter, setIntParameter, setLongParameter
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicHttpParams

public BasicHttpParams()
Method Detail

getParameter

public Object getParameter(String name)
Description copied from interface: HttpParams
Obtains the value of the given parameter.

Specified by:
getParameter in interface HttpParams
Parameters:
name - the parent name.
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
See Also:
HttpParams.setParameter(String, Object)

setParameter

public HttpParams setParameter(String name,
                               Object value)
Description copied from interface: HttpParams
Assigns the value to the parameter with the given name.

Specified by:
setParameter in interface HttpParams
Parameters:
name - parameter name
value - parameter value

removeParameter

public boolean removeParameter(String name)
Description copied from interface: HttpParams
Removes the parameter with the specified name.

Specified by:
removeParameter in interface HttpParams
Parameters:
name - parameter name
Returns:
true if the parameter existed and has been removed, false else.

setParameters

public void setParameters(String[] names,
                          Object value)
Assigns the value to all the parameter with the given names

Parameters:
names - array of parameter name
value - parameter value

isParameterSet

public boolean isParameterSet(String name)

isParameterSetLocally

public boolean isParameterSetLocally(String name)

clear

public void clear()
Removes all parameters from this collection.


copy

public HttpParams copy()
Creates a copy of these parameters. The implementation here instantiates BasicHttpParams, then calls copyParams(HttpParams) to populate the copy.

Specified by:
copy in interface HttpParams
Returns:
a new set of params holding a copy of the local parameters in this object.

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from class: Object
Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.

Classes which wish to support cloning must specify that they implement the Cloneable interface, since the implementation checks for this.

Overrides:
clone in class Object
Returns:
Object a shallow copy of this object.
Throws:
CloneNotSupportedException - if the receiver's class does not implement the interface Cloneable.

copyParams

protected void copyParams(HttpParams target)
Copies the locally defined parameters to the argument parameters. This method is called from copy().

Parameters:
target - the parameters to which to copy

Build 1.0_r1(from source)

Please submit a feedback, bug or feature