org.apache.hc.client5.http.routing

## Interface HttpRouteDirector

All Known Implementing Classes:
  BasicRouteDirector

    public interface 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.

Since:
  4.0

### Field Summary

Fields
`static int` `COMPLETE` Indicates that the route is complete.
`static int` `CONNECT_PROXY` Step: open connection to proxy.
`static int` `CONNECT_TARGET` Step: open connection to target.
`static int` `LAYER_PROTOCOL` Step: layer protocol (over tunnel).
`static int` `TUNNEL_PROXY` Step: tunnel through proxy to other proxy.
`static int` `TUNNEL_TARGET` Step: tunnel through proxy to target.
`static int` `UNREACHABLE` Indicates that the route can not be established at all.

### Method Summary

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

### Field Detail

#### UNREACHABLE

    static final int UNREACHABLE

Indicates that the route can not be established at all.

See Also:
  Constant Field Values

#### COMPLETE

    static final int COMPLETE

Indicates that the route is complete.

See Also:
  Constant Field Values

#### CONNECT_TARGET

    static final int CONNECT_TARGET

Step: open connection to target.

See Also:
  Constant Field Values

#### CONNECT_PROXY

    static final int CONNECT_PROXY

Step: open connection to proxy.

See Also:
  Constant Field Values

#### TUNNEL_TARGET

    static final int TUNNEL_TARGET

Step: tunnel through proxy to target.

See Also:
  Constant Field Values

#### TUNNEL_PROXY

    static final int TUNNEL_PROXY

Step: tunnel through proxy to other proxy.

See Also:
  Constant Field Values

#### LAYER_PROTOCOL

    static final int LAYER_PROTOCOL

Step: layer protocol (over tunnel).

See Also:
  Constant Field Values

### Method Detail

#### nextStep

    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.