public class SmartConfig
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_POLL_INTERVAL |
| Constructor and Description |
|---|
SmartConfig(java.util.List<Host> initialHosts)
Constructs a new SmartConfig using a new
LoadBalancer seeded with the specified hosts |
SmartConfig(LoadBalancer loadBalancer) |
SmartConfig(java.lang.String... initialHostNames) |
| Modifier and Type | Method and Description |
|---|---|
HostListProvider |
getHostListProvider() |
LoadBalancer |
getLoadBalancer() |
int |
getPollInterval() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
java.lang.Object |
getProperty(java.lang.String propName) |
java.lang.String |
getProxyPass() |
java.net.URI |
getProxyUri() |
java.lang.String |
getProxyUser() |
boolean |
isHealthCheckEnabled() |
boolean |
isHostUpdateEnabled() |
void |
setHealthCheckEnabled(boolean healthCheckEnabled) |
void |
setHostListProvider(HostListProvider hostListProvider) |
void |
setHostUpdateEnabled(boolean hostUpdateEnabled) |
void |
setPollInterval(int pollInterval)
Set the interval in seconds to wait between polling for active nodes.
|
void |
setProperty(java.lang.String propName,
java.lang.Object value)
Allows custom Jersey client properties to be set.
|
void |
setProxyPass(java.lang.String proxyPass) |
void |
setProxyUri(java.net.URI proxyUri) |
void |
setProxyUser(java.lang.String proxyUser) |
SmartConfig |
withHealthCheckEnabled(boolean healthCheckEnabled) |
SmartConfig |
withHostListProvider(HostListProvider hostListProvider) |
SmartConfig |
withHostUpdateEnabled(boolean hostUpdateEnabled) |
SmartConfig |
withPollInterval(int pollInterval) |
SmartConfig |
withProperty(java.lang.String propName,
java.lang.Object value) |
SmartConfig |
withProxyPass(java.lang.String proxyPass) |
SmartConfig |
withProxyUri(java.net.URI proxyUri) |
SmartConfig |
withProxyUser(java.lang.String proxyUser) |
public static final int DEFAULT_POLL_INTERVAL
public SmartConfig(java.lang.String... initialHostNames)
SmartConfig(LoadBalancer)public SmartConfig(java.util.List<Host> initialHosts)
LoadBalancer seeded with the specified hostspublic SmartConfig(LoadBalancer loadBalancer)
public LoadBalancer getLoadBalancer()
public java.net.URI getProxyUri()
public void setProxyUri(java.net.URI proxyUri)
public java.lang.String getProxyUser()
public void setProxyUser(java.lang.String proxyUser)
public java.lang.String getProxyPass()
public void setProxyPass(java.lang.String proxyPass)
public HostListProvider getHostListProvider()
public void setHostListProvider(HostListProvider hostListProvider)
public int getPollInterval()
public void setPollInterval(int pollInterval)
public boolean isHostUpdateEnabled()
public void setHostUpdateEnabled(boolean hostUpdateEnabled)
public boolean isHealthCheckEnabled()
public void setHealthCheckEnabled(boolean healthCheckEnabled)
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public java.lang.Object getProperty(java.lang.String propName)
public void setProperty(java.lang.String propName,
java.lang.Object value)
public SmartConfig withProxyUri(java.net.URI proxyUri)
public SmartConfig withProxyUser(java.lang.String proxyUser)
public SmartConfig withProxyPass(java.lang.String proxyPass)
public SmartConfig withHostListProvider(HostListProvider hostListProvider)
public SmartConfig withPollInterval(int pollInterval)
public SmartConfig withHostUpdateEnabled(boolean hostUpdateEnabled)
public SmartConfig withHealthCheckEnabled(boolean healthCheckEnabled)
public SmartConfig withProperty(java.lang.String propName, java.lang.Object value)