protected HttpRoute determineRoute(HttpHost    target,
                       HttpRequest request,
                       HttpContext context)
    throws HttpException {

    if (target == null) {
      target = (HttpHost) request.getParams().getParameter(
        ClientPNames.DEFAULT_HOST);
    }
    if (target == null) {
      throw new IllegalStateException
        ("Target host must not be null, or set in parameters.");
    }

    return this.routePlanner.determineRoute(target, request, context);
  }
protected HttpRoute determineRoute(HttpHost    target,
                       HttpRequest request,
                       HttpContext context)
    throws HttpException {

    if (target == null) {
      target = (HttpHost) request.getParams().getParameter(
        ClientPNames.DEFAULT_HOST);
    }
    if (target == null) {
      throw new IllegalStateException
        ("Target host must not be null, or set in parameters.");
    }

    return this.routePlanner.determineRoute(target, request, context);
  }
protected HttpRoute determineRoute ( HttpHost target , HttpRequest request , HttpContext context ) throws HttpException { if ( target == null ) { target = ( HttpHost ) request . getParams ( ) . getParameter ( ClientPNames . DEFAULT_HOST ) ; } if ( target == null ) { throw new IllegalStateException ( "Target host must not be null, or set in parameters." ) ; } return this . routePlanner . determineRoute ( target , request , context ) ; }
Determines the route for a request.
Called by {@link #execute}
to determine the route for either the original or a followup request.

@param target    the target host for the request.
Implementations may accept {@code null}
if they can still determine a route, for example
to a default target or by inspecting the request.
@param request   the request to execute
@param context   the context to use for the execution,
never {@code null}

@return  the route the request should take

@throws HttpException    in case of a problem
Determines the route for a request . Called by { @link #execute } to determine the route for either the original or a followup request .