public interface ServerPool
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptDiscoveredUrls(java.util.List<java.lang.String> discoveredServers)
When the connection received discovered servers (ServerInfo.getConnectURLs)
it passes them on to the provider for later use
|
void |
connectFailed(NatsUri nuri)
Indicate that the connection to this NatsUri failed.
|
void |
connectSucceeded(NatsUri nuri)
Indicate that the connection to this NatsUri succeeded.
|
java.util.List<java.lang.String> |
getServerList()
Get the list of servers known to the pool.
|
boolean |
hasSecureServer()
Whether the pool has any server with a secure scheme
|
void |
initialize(Options opts)
Initialize the pool.
|
NatsUri |
nextServer()
Get the next server to try to connect to.
|
NatsUri |
peekNextServer()
Just take a peek at the next server without doing any processing.
|
java.util.List<java.lang.String> |
resolveHostToIps(java.lang.String host)
Resolve a host name to an ip address
|
void initialize(Options opts)
opts - the options that was used to make the connection is suppliedboolean acceptDiscoveredUrls(java.util.List<java.lang.String> discoveredServers)
discoveredServers - the list of discovered servers.NatsUri peekNextServer()
NatsUri nextServer()
java.util.List<java.lang.String> resolveHostToIps(java.lang.String host)
host - the host to resolvevoid connectSucceeded(NatsUri nuri)
nuri - should match the NatsUri given by nextServervoid connectFailed(NatsUri nuri)
nuri - should match the NatsUri given by nextServerjava.util.List<java.lang.String> getServerList()
boolean hasSecureServer()