org.firepick
public class ServiceResolver extends Object
| Constructor and Description |
|---|
ServiceResolver(InetAddress address) |
ServiceResolver(URL url) |
| Modifier and Type | Method and Description |
|---|---|
static Collection<ServiceResolver> |
discover(InetAddress start,
int count,
int msTimeout)
Discover FireREST services located in a range of IPv4 InetAddresses.
|
InetAddress |
getAddress() |
int |
getAttempts()
Return number of attempts to resolve() service.
|
JSONResult |
getConfig()
Return the cached service configuration, resolving the service if required.
|
URL |
getURL() |
void |
resolve()
(Re-)discover the service configuration
|
ServiceResolver |
withTimeout(int msTimeout) |
public ServiceResolver(URL url)
public ServiceResolver(InetAddress address)
public ServiceResolver withTimeout(int msTimeout)
public static Collection<ServiceResolver> discover(InetAddress start, int count, int msTimeout)
start - first InetAddress to scan (null for localhost)count - number of subsequent InetAddresses in the rangemsTimeout - maximum time to wait for host responsepublic URL getURL()
public void resolve()
public int getAttempts()
public InetAddress getAddress()
public JSONResult getConfig()
Copyright © 2014. All rights reserved.