Class DefaultRoutePlanner

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.net.InetAddress determineLocalAddress​(org.apache.hc.core5.http.HttpHost firstHop, org.apache.hc.core5.http.protocol.HttpContext context)
      This implementation returns null.
      protected org.apache.hc.core5.http.HttpHost determineProxy​(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.protocol.HttpContext context)
      This implementation returns null.
      HttpRoute determineRoute​(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context)
      Determines the route for the given host.
      HttpRoute determineRoute​(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.protocol.HttpContext context)
      Determines the route for the given host.
      private static boolean sameNamedEndpoint​(org.apache.hc.core5.net.NamedEndpoint n1, org.apache.hc.core5.net.NamedEndpoint n2)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultRoutePlanner

        public DefaultRoutePlanner​(SchemePortResolver schemePortResolver)
    • Method Detail

      • sameNamedEndpoint

        private static boolean sameNamedEndpoint​(org.apache.hc.core5.net.NamedEndpoint n1,
                                                 org.apache.hc.core5.net.NamedEndpoint n2)
      • determineRoute

        public final HttpRoute determineRoute​(org.apache.hc.core5.http.HttpHost host,
                                              org.apache.hc.core5.http.HttpRequest request,
                                              org.apache.hc.core5.http.protocol.HttpContext context)
                                       throws org.apache.hc.core5.http.HttpException
        Description copied from interface: HttpRoutePlanner
        Determines the route for the given host.
        Specified by:
        determineRoute in interface HttpRoutePlanner
        Parameters:
        host - the target host for the request.
        request - the request message. Can be null if not given / known.
        context - the context to use for the subsequent execution. Implementations may accept null.
        Returns:
        the route that the request should take
        Throws:
        org.apache.hc.core5.http.HttpException - in case of a problem.
      • determineRoute

        public final HttpRoute determineRoute​(org.apache.hc.core5.http.HttpHost host,
                                              org.apache.hc.core5.http.protocol.HttpContext context)
                                       throws org.apache.hc.core5.http.HttpException
        Description copied from interface: HttpRoutePlanner
        Determines the route for the given host.
        Specified by:
        determineRoute in interface HttpRoutePlanner
        Parameters:
        host - the target host for the request.
        context - the context to use for the subsequent execution. Implementations may accept null.
        Returns:
        the route that the request should take
        Throws:
        org.apache.hc.core5.http.HttpException - in case of a problem
      • determineProxy

        protected org.apache.hc.core5.http.HttpHost determineProxy​(org.apache.hc.core5.http.HttpHost target,
                                                                   org.apache.hc.core5.http.protocol.HttpContext context)
                                                            throws org.apache.hc.core5.http.HttpException
        This implementation returns null.
        Throws:
        org.apache.hc.core5.http.HttpException - may be thrown if overridden
      • determineLocalAddress

        protected java.net.InetAddress determineLocalAddress​(org.apache.hc.core5.http.HttpHost firstHop,
                                                             org.apache.hc.core5.http.protocol.HttpContext context)
                                                      throws org.apache.hc.core5.http.HttpException
        This implementation returns null.
        Throws:
        org.apache.hc.core5.http.HttpException - may be thrown if overridden