org.apache.http.conn.routing.BasicRouteDirector
Basic implementation of an HttpRouteDirector.
This implementation is stateless and therefore thread-safe.
Summary
|
|
|
Value |
|
int |
COMPLETE |
Indicates that the route is complete. |
0 |
0x00000000 |
int |
CONNECT_PROXY |
Step: open connection to proxy. |
2 |
0x00000002 |
int |
CONNECT_TARGET |
Step: open connection to target. |
1 |
0x00000001 |
int |
LAYER_PROTOCOL |
Step: layer protocol (over tunnel). |
5 |
0x00000005 |
int |
TUNNEL_PROXY |
Step: tunnel through proxy to other proxy. |
4 |
0x00000004 |
int |
TUNNEL_TARGET |
Step: tunnel through proxy to target. |
3 |
0x00000003 |
int |
UNREACHABLE |
Indicates that the route can not be established at all. |
-1 |
0xffffffff |
Public Constructors
Public Methods
Protected Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
BasicRouteDirector()
Public Methods
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)
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)
Determines the first step to establish a route.
protected
int
proxiedStep(RouteInfo plan, RouteInfo fact)
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