Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

ConnRouteParams

extends Object
implements ConnRoutePNames
java.lang.Object
   ↳ org.apache.http.conn.params.ConnRouteParams

Class Overview

An adaptor for accessing route related parameters in HttpParams . See ConnRoutePNames for parameter name definitions.

Summary

[Expand]
Inherited Constants
From interface org.apache.http.conn.params.ConnRoutePNames
Fields
public static final HttpHost NO_HOST A special value indicating "no host".
public static final HttpRoute NO_ROUTE A special value indicating "no route".
Public Methods
static HttpHost getDefaultProxy ( HttpParams params)
Obtains the DEFAULT_PROXY parameter value.
static HttpRoute getForcedRoute ( HttpParams params)
Obtains the FORCED_ROUTE parameter value.
static InetAddress getLocalAddress ( HttpParams params)
Obtains the LOCAL_ADDRESS parameter value.
static void setDefaultProxy ( HttpParams params, HttpHost proxy)
Sets the DEFAULT_PROXY parameter value.
static void setForcedRoute ( HttpParams params, HttpRoute route)
Sets the FORCED_ROUTE parameter value.
static void setLocalAddress ( HttpParams params, InetAddress local)
Sets the LOCAL_ADDRESS parameter value.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final HttpHost NO_HOST

Added in API level 1

A special value indicating "no host". This relies on a nonsense scheme name to avoid conflicts with actual hosts. Note that this is a valid host.

public static final HttpRoute NO_ROUTE

Added in API level 1

A special value indicating "no route". This is a route with NO_HOST as the target.

Public Methods

public static HttpHost getDefaultProxy ( HttpParams params)

Added in API level 1

Obtains the DEFAULT_PROXY parameter value. NO_HOST will be mapped to null , to allow unsetting in a hierarchy.

Parameters
params the parameters in which to look up
Returns
  • the default proxy set in the argument parameters, or null if not set

public static HttpRoute getForcedRoute ( HttpParams params)

Added in API level 1

Obtains the FORCED_ROUTE parameter value. NO_ROUTE will be mapped to null , to allow unsetting in a hierarchy.

Parameters
params the parameters in which to look up
Returns
  • the forced route set in the argument parameters, or null if not set

public static InetAddress getLocalAddress ( HttpParams params)

Added in API level 1

Obtains the LOCAL_ADDRESS parameter value. There is no special value that would automatically be mapped to null . You can use the wildcard address (0.0.0.0 for IPv4, :: for IPv6) to override a specific local address in a hierarchy.

Parameters
params the parameters in which to look up
Returns
  • the local address set in the argument parameters, or null if not set

public static void setDefaultProxy ( HttpParams params, HttpHost proxy)

Added in API level 1

Sets the DEFAULT_PROXY parameter value.

Parameters
params the parameters in which to set the value
proxy the value to set, may be null . Note that NO_HOST will be mapped to null by getDefaultProxy(HttpParams) , to allow for explicit unsetting in hierarchies.

public static void setForcedRoute ( HttpParams params, HttpRoute route)

Added in API level 1

Sets the FORCED_ROUTE parameter value.

Parameters
params the parameters in which to set the value
route the value to set, may be null . Note that NO_ROUTE will be mapped to null by getForcedRoute(HttpParams) , to allow for explicit unsetting in hierarchies.

public static void setLocalAddress ( HttpParams params, InetAddress local)

Added in API level 1

Sets the LOCAL_ADDRESS parameter value.

Parameters
params the parameters in which to set the value
local the value to set, may be null