Android APIs
public class

BasicRouteDirector

extends Object
implements HttpRouteDirector
java.lang.Object
   ↳ org.apache.http.conn.routing.BasicRouteDirector

Class Overview

Basic implementation of an HttpRouteDirector. This implementation is stateless and therefore thread-safe.

Summary

[Expand]
Inherited Constants
From interface org.apache.http.conn.routing.HttpRouteDirector
Public Constructors
BasicRouteDirector()
Public Methods
int nextStep(RouteInfo plan, RouteInfo fact)
Provides the next step.
Protected Methods
int directStep(RouteInfo plan, RouteInfo fact)
Determines the next step to establish a direct connection.
int firstStep(RouteInfo plan)
Determines the first step to establish a route.
int proxiedStep(RouteInfo plan, RouteInfo fact)
Determines the next step to establish a connection via proxy.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.conn.routing.HttpRouteDirector

Public Constructors

public BasicRouteDirector ()

Added in API level 1

Public Methods

public int nextStep (RouteInfo plan, RouteInfo fact)

Added in API level 1

Provides the next step.

Parameters
plan the planned route
fact the currently established route, or null if nothing is established
Returns
  • one of the constants defined in this class, indicating either the next step to perform, or success, or failure. 0 is for success, a negative value for failure.

Protected Methods

protected int directStep (RouteInfo plan, RouteInfo fact)

Added in API level 1

Determines the next step to establish a direct connection.

Parameters
plan the planned route
fact the currently established route
Returns
  • one of the constants defined in this class, indicating either the next step to perform, or success, or failure

protected int firstStep (RouteInfo plan)

Added in API level 1

Determines the first step to establish a route.

Parameters
plan the planned route
Returns
  • the first step

protected int proxiedStep (RouteInfo plan, RouteInfo fact)

Added in API level 1

Determines the next step to establish a connection via proxy.

Parameters
plan the planned route
fact the currently established route
Returns
  • one of the constants defined in this class, indicating either the next step to perform, or success, or failure