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
ConstructorsConstructorDescriptionFixedLoadBalancer(URI uri) Constructs a new FixedLoadBalancer.FixedLoadBalancer(URL url) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionThe fixedServiceInstancereturned byselect(java.lang.Object).getUri()getUrl()Deprecated.UsegetUri()insteadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
selectin 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
-
getServiceInstance
The fixedServiceInstancereturned byselect(java.lang.Object). Internal use only.- Returns:
- The service instance
-
getContextPath
- Specified by:
getContextPathin interfaceLoadBalancer- Returns:
- The context path to use for requests.
-
FixedLoadBalancer(URI)instead