public class SimpleVipAddressResolver extends java.lang.Object implements VipAddressResolver
Ribbon supports a comma separated set of logcial addresses for a Ribbon Client. Typical/default implementation uses the list of servers obtained from the first of the comma separated list and progresses down the list only when the priorr vipAddress contains no servers.
This class assumes that the vip address string may contain marcos in the format of ${foo}, where foo is a property in Archaius configuration, and tries to replace these macros with actual values.
e.g. vipAddress settings
${foo}.bar:${port},${foobar}:80,localhost:8080
The above list will be resolved by this class as
apple.bar:80,limebar:80,localhost:8080
provided that the Configuration library resolves the property foo=apple,port=80 and foobar=limebar
| Constructor and Description |
|---|
SimpleVipAddressResolver() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
resolve(java.lang.String vipAddressMacro,
IClientConfig niwsClientConfig)
Resolve the vip address by replacing macros with actual values in configuration.
|
public java.lang.String resolve(java.lang.String vipAddressMacro,
IClientConfig niwsClientConfig)
resolve in interface VipAddressResolver