to top
Android APIs
Added in API level 1
public interface

HttpRouteDirector

org.apache.http.conn.routing.HttpRouteDirector
Known Indirect Subclasses

Class Overview

Provides directions on establishing a route. Implementations of this interface compare a planned route with a tracked route and indicate the next step required.

Summary

Constants
int COMPLETE Indicates that the route is complete.
int CONNECT_PROXY Step: open connection to proxy.
int CONNECT_TARGET Step: open connection to target.
int LAYER_PROTOCOL Step: layer protocol (over tunnel).
int TUNNEL_PROXY Step: tunnel through proxy to other proxy.
int TUNNEL_TARGET Step: tunnel through proxy to target.
int UNREACHABLE Indicates that the route can not be established at all.
Public Methods
abstract int nextStep(RouteInfo plan, RouteInfo fact)
Provides the next step.

Constants

public static final int COMPLETE

Added in API level 1

Indicates that the route is complete.

Constant Value: 0 (0x00000000)

public static final int CONNECT_PROXY

Added in API level 1

Step: open connection to proxy.

Constant Value: 2 (0x00000002)

public static final int CONNECT_TARGET

Added in API level 1

Step: open connection to target.

Constant Value: 1 (0x00000001)

public static final int LAYER_PROTOCOL

Added in API level 1

Step: layer protocol (over tunnel).

Constant Value: 5 (0x00000005)

public static final int TUNNEL_PROXY

Added in API level 1

Step: tunnel through proxy to other proxy.

Constant Value: 4 (0x00000004)

public static final int TUNNEL_TARGET

Added in API level 1

Step: tunnel through proxy to target.

Constant Value: 3 (0x00000003)

public static final int UNREACHABLE

Added in API level 1

Indicates that the route can not be established at all.

Constant Value: -1 (0xffffffff)

Public Methods

public abstract 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 interface, indicating either the next step to perform, or success, or failure. 0 is for success, a negative value for failure.