Class BasicHttpParams

java.lang.Object
org.apache.http.params.AbstractHttpParams
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.
Version:
$Revision: 610464 $
Author:
Oleg Kalnichevski
See Also:
Serialized Form
  • Constructor Details

    • BasicHttpParams

      public BasicHttpParams()
  • Method Details

    • 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
      Creates and returns a copy of this Object. The default implementation returns a so-called "shallow" copy: It creates a new instance of the same class and then copies the field values (including object references) from this instance to the new instance. A "deep" copy, in contrast, would also recursively clone nested objects. A subclass that needs to implement this kind of cloning should call super.clone() to create the new instance and then create deep copies of the nested, mutable objects.
      Overrides:
      clone in class Object
      Returns:
      a copy of this object.
      Throws:
      CloneNotSupportedException - if this object's class does not implement the Cloneable interface.
    • 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