@Singleton public class DefaultLoadBalancerResolver extends Object implements LoadBalancerResolver
Abstraction over LoadBalancer lookup. The strategy is as follows:
EmbeddedServerDiscoveryClient to attempt to resolve the URIs| Constructor and Description | 
|---|
| DefaultLoadBalancerResolver(BeanContext beanContext,
                           List<ServiceInstanceList> serviceInstanceLists)The default server loadbalance resolver. | 
| DefaultLoadBalancerResolver(BeanContext beanContext,
                           ServiceInstanceList... serviceInstanceLists)The default server loadbalance resolver. | 
| Modifier and Type | Method and Description | 
|---|---|
| Optional<? extends LoadBalancer> | resolve(String... serviceReferences)Resolve a  LoadBalancerfor the given references. | 
| protected Optional<? extends LoadBalancer> | resolveLoadBalancerForServiceID(String serviceID) | 
public DefaultLoadBalancerResolver(BeanContext beanContext, ServiceInstanceList... serviceInstanceLists)
beanContext - The bean contextserviceInstanceLists - Any other providers@Inject public DefaultLoadBalancerResolver(BeanContext beanContext, List<ServiceInstanceList> serviceInstanceLists)
beanContext - The bean contextserviceInstanceLists - Any other providerspublic Optional<? extends LoadBalancer> resolve(String... serviceReferences)
LoadBalancerResolverLoadBalancer for the given references.resolve in interface LoadBalancerResolverserviceReferences - The references. These could be service IDs or fully HTTP URLsLoadBalancer or empty of non can be resolvedprotected Optional<? extends LoadBalancer> resolveLoadBalancerForServiceID(String serviceID)
serviceID - The service IdOptional with the load balancer