public class StaticServiceInstanceList extends Object implements ServiceInstanceList
ServiceInstanceList using a static list of URLs. This class doesn't support health checking.| Constructor and Description |
|---|
StaticServiceInstanceList(String id,
Collection<URI> loadBalancedURIs)
Default constructor.
|
StaticServiceInstanceList(String id,
Collection<URI> loadBalancedURIs,
String contextPath)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getContextPath() |
String |
getID() |
List<ServiceInstance> |
getInstances()
Returns the current list of services.
|
Collection<URI> |
getLoadBalancedURIs() |
public StaticServiceInstanceList(String id, Collection<URI> loadBalancedURIs)
id - The idloadBalancedURIs - The URIspublic StaticServiceInstanceList(String id, Collection<URI> loadBalancedURIs, @Nullable String contextPath)
id - The idloadBalancedURIs - The URIscontextPath - The context pathpublic String getID()
getID in interface ServiceInstanceListpublic List<ServiceInstance> getInstances()
ServiceInstanceListgetInstances in interface ServiceInstanceListpublic Collection<URI> getLoadBalancedURIs()
public Optional<String> getContextPath()
getContextPath in interface ServiceInstanceList