com.netflix.client
Class SimpleVipAddressResolver
java.lang.Object
com.netflix.client.SimpleVipAddressResolver
- All Implemented Interfaces:
- VipAddressResolver
public class SimpleVipAddressResolver
- extends java.lang.Object
- implements VipAddressResolver
A "VipAddress" in Ribbon terminology is a logical name used for a target
server farm. This class helps interpret and resolve a "macro" and obtain a
finalized vipAddress.
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.
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
Method Summary |
java.lang.String |
resolve(java.lang.String vipAddressMacro,
IClientConfig niwsClientConfig)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleVipAddressResolver
public SimpleVipAddressResolver()
resolve
public java.lang.String resolve(java.lang.String vipAddressMacro,
IClientConfig niwsClientConfig)
- Specified by:
resolve
in interface VipAddressResolver