Module bus.http

Class RouteSelector

java.lang.Object
org.miaixz.bus.http.accord.RouteSelector

public class RouteSelector extends Object
Selects routes to connect to an origin server. Each connection requires a choice of proxy server, IP address, and TLS mode. Connections may also be recycled.
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

  • Method Details

    • hasNext

      public boolean hasNext()
      Returns true if there is another set of routes to attempt. Every address has at least one route.
      Returns:
      true if there is another route to attempt.
    • next

      public RouteSelector.Selection next() throws IOException
      Returns the next selection of routes to attempt.
      Returns:
      The next selection of routes.
      Throws:
      IOException - if an I/O error occurs.