Class FixedLoadBalancer
java.lang.Object
io.micronaut.http.client.loadbalance.FixedLoadBalancer
- All Implemented Interfaces:
LoadBalancer
A
LoadBalancer
that resolves a fixed URI.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
ConstructorDescriptionFixedLoadBalancer
(URI uri) Constructs a new FixedLoadBalancer.FixedLoadBalancer
(URL url) Deprecated. -
Method Summary
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 Details
-
FixedLoadBalancer
Deprecated.UseFixedLoadBalancer(URI)
insteadConstructs a new FixedLoadBalancer.- Parameters:
url
- The URL to fix to
-
FixedLoadBalancer
Constructs a new FixedLoadBalancer.- Parameters:
uri
- The URI to fix to
-
-
Method Details
-
select
- Specified by:
select
in interfaceLoadBalancer
- Parameters:
discriminator
- An object used to discriminate the server to select. Usually the service ID- Returns:
- The selected
ServiceInstance
-
getUrl
Deprecated.UsegetUri()
instead- Returns:
- The URL of the
LoadBalancer
-
getUri
- Returns:
- The URI of the
LoadBalancer
-
getContextPath
- Specified by:
getContextPath
in interfaceLoadBalancer
- Returns:
- The context path to use for requests.
-
FixedLoadBalancer(URI)
instead