public abstract class AbstractRibbonClientConfig
extends java.lang.Object
implements com.netflix.client.config.IClientConfig
IClientConfig
interface.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREFIX
The prefix to use for all Ribbon settings.
|
Constructor and Description |
---|
AbstractRibbonClientConfig(io.micronaut.context.env.Environment environment)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsProperty(com.netflix.client.config.IClientConfigKey key) |
<T> T |
get(com.netflix.client.config.IClientConfigKey<T> key) |
protected <T> T |
get(com.netflix.client.config.IClientConfigKey<T> key,
java.lang.Class<T> type,
T defaultValue)
Get a property based on the parameters.
|
<T> T |
get(com.netflix.client.config.IClientConfigKey<T> key,
T defaultValue) |
java.lang.String |
getClientName() |
<T> com.netflix.client.config.Property<T> |
getDynamicProperty(com.netflix.client.config.IClientConfigKey<T> key) |
<T> com.netflix.client.config.Property<T> |
getGlobalProperty(com.netflix.client.config.IClientConfigKey<T> key) |
java.lang.String |
getNameSpace() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
java.lang.Object |
getProperty(com.netflix.client.config.IClientConfigKey key)
Deprecated.
|
java.lang.Object |
getProperty(com.netflix.client.config.IClientConfigKey key,
java.lang.Object defaultVal)
Deprecated.
|
boolean |
getPropertyAsBoolean(com.netflix.client.config.IClientConfigKey key,
boolean defaultValue) |
int |
getPropertyAsInteger(com.netflix.client.config.IClientConfigKey key,
int defaultValue) |
java.lang.String |
getPropertyAsString(com.netflix.client.config.IClientConfigKey key,
java.lang.String defaultValue) |
void |
loadDefaultValues() |
void |
loadProperties(java.lang.String clientName) |
protected java.lang.String |
qualifyKey(com.netflix.client.config.IClientConfigKey key)
Return the namespace + key.
|
java.lang.String |
resolveDeploymentContextbasedVipAddresses() |
<T> com.netflix.client.config.IClientConfig |
set(com.netflix.client.config.IClientConfigKey<T> key,
T value) |
void |
setNameSpace(java.lang.String nameSpace) |
void |
setProperty(com.netflix.client.config.IClientConfigKey key,
java.lang.Object value)
Deprecated.
|
void |
setVipAddressResolver(java.util.Optional<com.netflix.client.VipAddressResolver> resolver)
Sets an optional
VipAddressResolver . |
public static final java.lang.String PREFIX
public AbstractRibbonClientConfig(io.micronaut.context.env.Environment environment)
environment
- environmentpublic void setNameSpace(java.lang.String nameSpace)
setNameSpace
in interface com.netflix.client.config.IClientConfig
public <T> com.netflix.client.config.Property<T> getGlobalProperty(com.netflix.client.config.IClientConfigKey<T> key)
getGlobalProperty
in interface com.netflix.client.config.IClientConfig
public <T> com.netflix.client.config.Property<T> getDynamicProperty(com.netflix.client.config.IClientConfigKey<T> key)
getDynamicProperty
in interface com.netflix.client.config.IClientConfig
@Inject public void setVipAddressResolver(java.util.Optional<com.netflix.client.VipAddressResolver> resolver)
VipAddressResolver
.resolver
- The VipAddressResolver
public java.lang.String getClientName()
getClientName
in interface com.netflix.client.config.IClientConfig
IClientConfig.getClientName()
public java.lang.String getNameSpace()
getNameSpace
in interface com.netflix.client.config.IClientConfig
IClientConfig.getNameSpace()
public void loadProperties(java.lang.String clientName)
loadProperties
in interface com.netflix.client.config.IClientConfig
IClientConfig.loadProperties(String)
public void loadDefaultValues()
loadDefaultValues
in interface com.netflix.client.config.IClientConfig
IClientConfig.loadDefaultValues()
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties
in interface com.netflix.client.config.IClientConfig
IClientConfig.getProperties()
@Deprecated public void setProperty(com.netflix.client.config.IClientConfigKey key, java.lang.Object value)
setProperty
in interface com.netflix.client.config.IClientConfig
IClientConfig.setProperty(IClientConfigKey, Object)
@Deprecated public java.lang.Object getProperty(com.netflix.client.config.IClientConfigKey key)
getProperty
in interface com.netflix.client.config.IClientConfig
IClientConfig.getProperty(IClientConfigKey)
@Deprecated public java.lang.Object getProperty(com.netflix.client.config.IClientConfigKey key, java.lang.Object defaultVal)
getProperty
in interface com.netflix.client.config.IClientConfig
IClientConfig.getProperty(IClientConfigKey, Object)
public boolean containsProperty(com.netflix.client.config.IClientConfigKey key)
containsProperty
in interface com.netflix.client.config.IClientConfig
IClientConfig.containsProperty(IClientConfigKey)
public int getPropertyAsInteger(com.netflix.client.config.IClientConfigKey key, int defaultValue)
getPropertyAsInteger
in interface com.netflix.client.config.IClientConfig
IClientConfig.getPropertyAsInteger(IClientConfigKey, int)
public java.lang.String getPropertyAsString(com.netflix.client.config.IClientConfigKey key, java.lang.String defaultValue)
getPropertyAsString
in interface com.netflix.client.config.IClientConfig
IClientConfig.getPropertyAsString(IClientConfigKey, String)
public boolean getPropertyAsBoolean(com.netflix.client.config.IClientConfigKey key, boolean defaultValue)
getPropertyAsBoolean
in interface com.netflix.client.config.IClientConfig
IClientConfig.getPropertyAsBoolean(IClientConfigKey, boolean)
public <T> T get(com.netflix.client.config.IClientConfigKey<T> key)
get
in interface com.netflix.client.config.IClientConfig
IClientConfig.get(IClientConfigKey)
public <T> T get(com.netflix.client.config.IClientConfigKey<T> key, T defaultValue)
get
in interface com.netflix.client.config.IClientConfig
IClientConfig.get(IClientConfigKey, Object)
public <T> com.netflix.client.config.IClientConfig set(com.netflix.client.config.IClientConfigKey<T> key, T value)
set
in interface com.netflix.client.config.IClientConfig
IClientConfig.set(IClientConfigKey, Object)
public java.lang.String resolveDeploymentContextbasedVipAddresses()
resolveDeploymentContextbasedVipAddresses
in interface com.netflix.client.config.IClientConfig
IClientConfig.resolveDeploymentContextbasedVipAddresses()
protected <T> T get(com.netflix.client.config.IClientConfigKey<T> key, java.lang.Class<T> type, T defaultValue)
T
- type of config keykey
- keytype
- typedefaultValue
- defaultValueprotected java.lang.String qualifyKey(com.netflix.client.config.IClientConfigKey key)
key
- key