public class SpringClientFactory extends org.springframework.cloud.context.named.NamedContextFactory<RibbonClientSpecification>
Constructor and Description |
---|
SpringClientFactory() |
Modifier and Type | Method and Description |
---|---|
<C extends com.netflix.client.IClient<?,?>> |
getClient(String name,
Class<C> clientClass)
Get the rest client associated with the name.
|
com.netflix.client.config.IClientConfig |
getClientConfig(String name)
Get the client config associated with the name.
|
<C> C |
getInstance(String name,
Class<C> type) |
com.netflix.loadbalancer.ILoadBalancer |
getLoadBalancer(String name)
Get the load balancer associated with the name.
|
RibbonLoadBalancerContext |
getLoadBalancerContext(String serviceId)
Get the load balancer context associated with the name.
|
public <C extends com.netflix.client.IClient<?,?>> C getClient(String name, Class<C> clientClass)
RuntimeException
- if any error occurspublic com.netflix.loadbalancer.ILoadBalancer getLoadBalancer(String name)
RuntimeException
- if any error occurspublic com.netflix.client.config.IClientConfig getClientConfig(String name)
RuntimeException
- if any error occurspublic RibbonLoadBalancerContext getLoadBalancerContext(String serviceId)
RuntimeException
- if any error occurspublic <C> C getInstance(String name, Class<C> type)
getInstance
in class org.springframework.cloud.context.named.NamedContextFactory<RibbonClientSpecification>
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.