Top Description Fields Methods
org.apache.hc.client5.http.routing

public Interface HttpRouteDirector

Known Direct Implementers
org.apache.hc.client5.http.impl.routing.BasicRouteDirector
Annotations
@Contract
threading:STATELESS
Imports
org.apache.hc.client5.http.RouteInfo, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior

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

Field Summary

Modifier and TypeField and Description
public static final int
COMPLETE

Indicates that the route is complete.

public static final int
CONNECT_PROXY

Step: open connection to proxy.

public static final int
CONNECT_TARGET

Step: open connection to target.

public static final int
LAYER_PROTOCOL

Step: layer protocol (over tunnel).

public static final int
TUNNEL_PROXY

Step: tunnel through proxy to other proxy.

public static final int
TUNNEL_TARGET

Step: tunnel through proxy to target.

public static final int
UNREACHABLE

Indicates that the route can not be established at all.

Method Summary

Modifier and TypeMethod and Description
public int

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.
nextStep
(RouteInfo
the planned route
plan
,
RouteInfo
the currently established route, or null if nothing is established
fact
)

Provides the next step.

Field Detail

COMPLETEback to summary
public static final int COMPLETE

Indicates that the route is complete.

CONNECT_PROXYback to summary
public static final int CONNECT_PROXY

Step: open connection to proxy.

CONNECT_TARGETback to summary
public static final int CONNECT_TARGET

Step: open connection to target.

LAYER_PROTOCOLback to summary
public static final int LAYER_PROTOCOL

Step: layer protocol (over tunnel).

TUNNEL_PROXYback to summary
public static final int TUNNEL_PROXY

Step: tunnel through proxy to other proxy.

TUNNEL_TARGETback to summary
public static final int TUNNEL_TARGET

Step: tunnel through proxy to target.

UNREACHABLEback to summary
public static final int UNREACHABLE

Indicates that the route can not be established at all.

Method Detail

nextStepback to summary
public int nextStep(RouteInfo plan, RouteInfo fact)

Provides the next step.

Parameters
plan:RouteInfo

the planned route

fact:RouteInfo

the currently established route, or null if nothing is established

Returns:int

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.