Class DefaultLoadBalancerResolver

java.lang.Object
io.micronaut.http.client.DefaultLoadBalancerResolver
All Implemented Interfaces:
LoadBalancerResolver

@Singleton public class DefaultLoadBalancerResolver extends Object implements LoadBalancerResolver

Abstraction over LoadBalancer lookup. The strategy is as follows:

  • If a reference starts with '/' then we attempt to look up the EmbeddedServer
  • If the reference contains a '/' assume it is a URL and try to create a URL reference to it
  • Otherwise delegate to the DiscoveryClient to attempt to resolve the URIs
Since:
1.0
Author:
Graeme Rocher
  • Constructor Details

    • DefaultLoadBalancerResolver

      public DefaultLoadBalancerResolver(BeanContext beanContext, ServiceInstanceList... serviceInstanceLists)
      The default server loadbalance resolver.
      Parameters:
      beanContext - The bean context
      serviceInstanceLists - Any other providers
    • DefaultLoadBalancerResolver

      @Inject public DefaultLoadBalancerResolver(BeanContext beanContext, List<ServiceInstanceList> serviceInstanceLists)
      The default server loadbalance resolver.
      Parameters:
      beanContext - The bean context
      serviceInstanceLists - Any other providers
  • Method Details