public class FixedLoadBalancer extends Object implements LoadBalancer
LoadBalancer
that resolves a fixed URI.Constructor and Description |
---|
FixedLoadBalancer(URI uri)
Constructs a new FixedLoadBalancer.
|
FixedLoadBalancer(URL url)
Deprecated.
Use
FixedLoadBalancer(URI) instead |
Modifier and Type | Method and Description |
---|---|
Optional<String> |
getContextPath() |
URI |
getUri() |
URL |
getUrl()
Deprecated.
Use
getUri() instead |
Publisher<ServiceInstance> |
select(Object discriminator) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
empty, fixed, fixed, select
@Deprecated public FixedLoadBalancer(URL url)
FixedLoadBalancer(URI)
insteadurl
- The URL to fix topublic FixedLoadBalancer(URI uri)
uri
- The URI to fix topublic Publisher<ServiceInstance> select(@Nullable Object discriminator)
select
in interface LoadBalancer
discriminator
- An object used to discriminate the server to select. Usually the service IDServiceInstance
@Deprecated public URL getUrl()
getUri()
insteadLoadBalancer
public URI getUri()
LoadBalancer
public Optional<String> getContextPath()
getContextPath
in interface LoadBalancer