public final class RouteSelector extends Object
Modifier and Type | Method and Description |
---|---|
void |
connectFailed(Connection connection,
IOException failure)
Clients should invoke this method when they encounter a connectivity
failure on a connection returned by this route selector.
|
static RouteSelector |
get(Request request,
OkHttpClient client) |
boolean |
hasNext()
Returns true if there's another route to attempt.
|
Connection |
next(HttpEngine owner)
Selects a route to attempt and connects it if it isn't already.
|
public static RouteSelector get(Request request, OkHttpClient client) throws IOException
IOException
public boolean hasNext()
public Connection next(HttpEngine owner) throws IOException
IOException
public void connectFailed(Connection connection, IOException failure)
Copyright © 2015. All rights reserved.