Interface HttpParams

  • All Known Implementing Classes:
    AbstractHttpParams, BasicHttpParams, ClientParamsStack, DefaultedHttpParams, SyncBasicHttpParams

    @Deprecated
    public interface HttpParams
    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

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      HttpParams copy()
      Deprecated.
      Creates a copy of these parameters.
      boolean getBooleanParameter​(java.lang.String name, boolean defaultValue)
      Deprecated.
      Returns a Boolean parameter value with the given name.
      double getDoubleParameter​(java.lang.String name, double defaultValue)
      Deprecated.
      Returns a Double parameter value with the given name.
      int getIntParameter​(java.lang.String name, int defaultValue)
      Deprecated.
      Returns an Integer parameter value with the given name.
      long getLongParameter​(java.lang.String name, long defaultValue)
      Deprecated.
      Returns a Long parameter value with the given name.
      java.lang.Object getParameter​(java.lang.String name)
      Deprecated.
      Obtains the value of the given parameter.
      boolean isParameterFalse​(java.lang.String name)
      Deprecated.
      Checks if a boolean parameter is not set or false.
      boolean isParameterTrue​(java.lang.String name)
      Deprecated.
      Checks if a boolean parameter is set to true.
      boolean removeParameter​(java.lang.String name)
      Deprecated.
      Removes the parameter with the specified name.
      HttpParams setBooleanParameter​(java.lang.String name, boolean value)
      Deprecated.
      Assigns a Boolean to the parameter with the given name
      HttpParams setDoubleParameter​(java.lang.String name, double value)
      Deprecated.
      Assigns a Double to the parameter with the given name
      HttpParams setIntParameter​(java.lang.String name, int value)
      Deprecated.
      Assigns an Integer to the parameter with the given name
      HttpParams setLongParameter​(java.lang.String name, long value)
      Deprecated.
      Assigns a Long to the parameter with the given name
      HttpParams setParameter​(java.lang.String name, java.lang.Object value)
      Deprecated.
      Assigns the value to the parameter with the given name.
    • Method Detail

      • getParameter

        java.lang.Object getParameter​(java.lang.String name)
        Deprecated.
        Obtains the value of the given parameter.
        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:
        setParameter(String, Object)
      • setParameter

        HttpParams setParameter​(java.lang.String name,
                                java.lang.Object value)
        Deprecated.
        Assigns the value to the parameter with the given name.
        Parameters:
        name - parameter name
        value - parameter value
      • copy

        HttpParams copy()
        Deprecated.
        Creates a copy of these parameters.
        Returns:
        a new set of parameters holding the same values as this one
      • removeParameter

        boolean removeParameter​(java.lang.String name)
        Deprecated.
        Removes the parameter with the specified name.
        Parameters:
        name - parameter name
        Returns:
        true if the parameter existed and has been removed, false else.
      • getLongParameter

        long getLongParameter​(java.lang.String name,
                              long defaultValue)
        Deprecated.
        Returns a Long parameter value with the given name. If the parameter is not explicitly set, the default value is returned.
        Parameters:
        name - the parent name.
        defaultValue - the default value.
        Returns:
        a Long that represents the value of the parameter.
        See Also:
        setLongParameter(String, long)
      • setLongParameter

        HttpParams setLongParameter​(java.lang.String name,
                                    long value)
        Deprecated.
        Assigns a Long to the parameter with the given name
        Parameters:
        name - parameter name
        value - parameter value
      • getIntParameter

        int getIntParameter​(java.lang.String name,
                            int defaultValue)
        Deprecated.
        Returns an Integer parameter value with the given name. If the parameter is not explicitly set, the default value is returned.
        Parameters:
        name - the parent name.
        defaultValue - the default value.
        Returns:
        a Integer that represents the value of the parameter.
        See Also:
        setIntParameter(String, int)
      • setIntParameter

        HttpParams setIntParameter​(java.lang.String name,
                                   int value)
        Deprecated.
        Assigns an Integer to the parameter with the given name
        Parameters:
        name - parameter name
        value - parameter value
      • getDoubleParameter

        double getDoubleParameter​(java.lang.String name,
                                  double defaultValue)
        Deprecated.
        Returns a Double parameter value with the given name. If the parameter is not explicitly set, the default value is returned.
        Parameters:
        name - the parent name.
        defaultValue - the default value.
        Returns:
        a Double that represents the value of the parameter.
        See Also:
        setDoubleParameter(String, double)
      • setDoubleParameter

        HttpParams setDoubleParameter​(java.lang.String name,
                                      double value)
        Deprecated.
        Assigns a Double to the parameter with the given name
        Parameters:
        name - parameter name
        value - parameter value
      • getBooleanParameter

        boolean getBooleanParameter​(java.lang.String name,
                                    boolean defaultValue)
        Deprecated.
        Returns a Boolean parameter value with the given name. If the parameter is not explicitly set, the default value is returned.
        Parameters:
        name - the parent name.
        defaultValue - the default value.
        Returns:
        a Boolean that represents the value of the parameter.
        See Also:
        setBooleanParameter(String, boolean)
      • setBooleanParameter

        HttpParams setBooleanParameter​(java.lang.String name,
                                       boolean value)
        Deprecated.
        Assigns a Boolean to the parameter with the given name
        Parameters:
        name - parameter name
        value - parameter value
      • isParameterTrue

        boolean isParameterTrue​(java.lang.String name)
        Deprecated.
        Checks if a boolean parameter is set to true.
        Parameters:
        name - parameter name
        Returns:
        true if the parameter is set to value true, false if it is not set or set to false
      • isParameterFalse

        boolean isParameterFalse​(java.lang.String name)
        Deprecated.
        Checks if a boolean parameter is not set or false.
        Parameters:
        name - parameter name
        Returns:
        true if the parameter is either not set or set to value false, false if it is set to true