Class FixedLoadBalancer
- java.lang.Object
-
- io.micronaut.http.client.loadbalance.FixedLoadBalancer
-
- All Implemented Interfaces:
LoadBalancer
public class FixedLoadBalancer extends java.lang.Object implements LoadBalancer
ALoadBalancerthat resolves a fixed URI.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description FixedLoadBalancer(java.net.URI uri)Constructs a new FixedLoadBalancer.FixedLoadBalancer(java.net.URL url)Deprecated.UseFixedLoadBalancer(URI)instead
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Optional<java.lang.String>getContextPath()java.net.URIgetUri()java.net.URLgetUrl()Deprecated.UsegetUri()insteadorg.reactivestreams.Publisher<io.micronaut.discovery.ServiceInstance>select(java.lang.Object discriminator)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.http.client.LoadBalancer
select
-
-
-
-
Constructor Detail
-
FixedLoadBalancer
@Deprecated public FixedLoadBalancer(java.net.URL url)
Deprecated.UseFixedLoadBalancer(URI)insteadConstructs a new FixedLoadBalancer.- Parameters:
url- The URL to fix to
-
FixedLoadBalancer
public FixedLoadBalancer(java.net.URI uri)
Constructs a new FixedLoadBalancer.- Parameters:
uri- The URI to fix to
-
-
Method Detail
-
select
public org.reactivestreams.Publisher<io.micronaut.discovery.ServiceInstance> select(@Nullable java.lang.Object discriminator)- Specified by:
selectin interfaceLoadBalancer- Parameters:
discriminator- An object used to discriminate the server to select. Usually the service ID- Returns:
- The selected
ServiceInstance
-
getUrl
@Deprecated public java.net.URL getUrl()
Deprecated.UsegetUri()instead- Returns:
- The URL of the
LoadBalancer
-
getUri
public java.net.URI getUri()
- Returns:
- The URI of the
LoadBalancer
-
getContextPath
public java.util.Optional<java.lang.String> getContextPath()
- Specified by:
getContextPathin interfaceLoadBalancer- Returns:
- The context path to use for requests.
-
-