Android
org.apache.http.conn.routing
public interface

org.apache.http.conn.routing.HttpRouteDirector

org.apache.http.conn.routing.HttpRouteDirector

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

Known Indirect Subclasses

Summary

Constants

      Value  
int  COMPLETE  Indicates that the route is complete.  0x00000000 
int  CONNECT_PROXY  Step: open connection to proxy.  0x00000002 
int  CONNECT_TARGET  Step: open connection to target.  0x00000001 
int  LAYER_PROTOCOL  Step: layer protocol (over tunnel).  0x00000005 
int  TUNNEL_PROXY  Step: tunnel through proxy to other proxy.  0x00000004 
int  TUNNEL_TARGET  Step: tunnel through proxy to target.  0x00000003 
int  UNREACHABLE  Indicates that the route can not be established at all.  -1  0xffffffff 

Public Methods

          int  nextStep(RouteInfo plan, RouteInfo fact)
Provides the next step.

Details

Constants

public static final int COMPLETE

Indicates that the route is complete.
Constant Value: 0 (0x00000000)

public static final int CONNECT_PROXY

Step: open connection to proxy.
Constant Value: 2 (0x00000002)

public static final int CONNECT_TARGET

Step: open connection to target.
Constant Value: 1 (0x00000001)

public static final int LAYER_PROTOCOL

Step: layer protocol (over tunnel).
Constant Value: 5 (0x00000005)

public static final int TUNNEL_PROXY

Step: tunnel through proxy to other proxy.
Constant Value: 4 (0x00000004)

public static final int TUNNEL_TARGET

Step: tunnel through proxy to target.
Constant Value: 3 (0x00000003)

public static final int UNREACHABLE

Indicates that the route can not be established at all.
Constant Value: -1 (0xffffffff)

Public Methods

public int nextStep(RouteInfo plan, RouteInfo fact)

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.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48