to top
Android APIs
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

Since: API Level 1

Indicates that the route is complete.

Constant Value: 0 (0x00000000)

public static final int CONNECT_PROXY

Since: API Level 1

Step: open connection to proxy.

Constant Value: 2 (0x00000002)

public static final int CONNECT_TARGET

Since: API Level 1

Step: open connection to target.

Constant Value: 1 (0x00000001)

public static final int LAYER_PROTOCOL

Since: API Level 1

Step: layer protocol (over tunnel).

Constant Value: 5 (0x00000005)

public static final int TUNNEL_PROXY

Since: API Level 1

Step: tunnel through proxy to other proxy.

Constant Value: 4 (0x00000004)

public static final int TUNNEL_TARGET

Since: API Level 1

Step: tunnel through proxy to target.

Constant Value: 3 (0x00000003)

public static final int UNREACHABLE

Since: 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)

Since: 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.