public final class RouteSelector extends Object
Constructor and Description |
---|
RouteSelector(Address address,
URI uri,
ProxySelector proxySelector,
ConnectionPool pool,
Dns dns,
RouteDatabase routeDatabase) |
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.
|
boolean |
hasNext()
Returns true if there's another route to attempt.
|
Connection |
next(String method)
Returns the next route address to attempt.
|
public RouteSelector(Address address, URI uri, ProxySelector proxySelector, ConnectionPool pool, Dns dns, RouteDatabase routeDatabase)
public boolean hasNext()
public Connection next(String method) throws IOException
NoSuchElementException
- if there are no more routes to attempt.IOException
public void connectFailed(Connection connection, IOException failure)
Copyright © 2014. All rights reserved.