public class ConsulPropertySource
extends org.springframework.core.env.EnumerablePropertySource<com.ecwid.consul.v1.ConsulClient>
| Constructor and Description |
|---|
ConsulPropertySource(String context,
com.ecwid.consul.v1.ConsulClient source,
ConsulConfigProperties configProperties) |
| Modifier and Type | Method and Description |
|---|---|
protected Properties |
generateProperties(String value,
ConsulConfigProperties.Format format) |
protected ConsulConfigProperties |
getConfigProperties() |
protected String |
getContext() |
String |
getDecoded(String value)
Deprecated.
As of 1.1.0 use
GetValue.getDecodedValue(). |
Long |
getInitialIndex() |
protected Map<String,Object> |
getProperties() |
Object |
getProperty(String name) |
String[] |
getPropertyNames() |
void |
init() |
protected void |
parsePropertiesInKeyValueFormat(List<com.ecwid.consul.v1.kv.model.GetValue> values)
Parses the properties in key value style i.e., values are expected to be either a
sub key or a constant.
|
protected void |
parsePropertiesWithNonKeyValueFormat(List<com.ecwid.consul.v1.kv.model.GetValue> values,
ConsulConfigProperties.Format format)
Parses the properties using the format which is not a key value style i.e., either
java properties style or YAML style.
|
protected void |
parseValue(com.ecwid.consul.v1.kv.model.GetValue getValue,
ConsulConfigProperties.Format format) |
public ConsulPropertySource(String context, com.ecwid.consul.v1.ConsulClient source, ConsulConfigProperties configProperties)
public void init()
public Long getInitialIndex()
protected void parsePropertiesInKeyValueFormat(List<com.ecwid.consul.v1.kv.model.GetValue> values)
values - values to parseprotected void parsePropertiesWithNonKeyValueFormat(List<com.ecwid.consul.v1.kv.model.GetValue> values, ConsulConfigProperties.Format format)
values - values to parseformat - format in which the values should be parsedprotected void parseValue(com.ecwid.consul.v1.kv.model.GetValue getValue,
ConsulConfigProperties.Format format)
protected Properties generateProperties(String value, ConsulConfigProperties.Format format)
@Deprecated public String getDecoded(String value)
GetValue.getDecodedValue().value - encoded valueprotected ConsulConfigProperties getConfigProperties()
protected String getContext()
public Object getProperty(String name)
getProperty in class org.springframework.core.env.PropertySource<com.ecwid.consul.v1.ConsulClient>public String[] getPropertyNames()
getPropertyNames in class org.springframework.core.env.EnumerablePropertySource<com.ecwid.consul.v1.ConsulClient>Copyright © 2021 Pivotal Software, Inc.. All rights reserved.