java.lang.Object
org.miaixz.bus.http.accord.RouteSelector
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA selection of routes to try. -
Constructor Summary
ConstructorsConstructorDescriptionRouteSelector(Address address, RouteDatabase routeDatabase, NewCall call, EventListener eventListener) -
Method Summary
-
Constructor Details
-
RouteSelector
public RouteSelector(Address address, RouteDatabase routeDatabase, NewCall call, EventListener eventListener)
-
-
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:
trueif there is another route to attempt.
-
next
Returns the next selection of routes to attempt.- Returns:
- The next selection of routes.
- Throws:
IOException- if an I/O error occurs.
-