public class RibbonUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_NAMESPACE |
static String |
VALUE_NOT_SET |
Constructor and Description |
---|
RibbonUtils() |
Modifier and Type | Method and Description |
---|---|
static com.netflix.config.DynamicStringProperty |
getProperty(String key) |
static String |
getRibbonKey(String serviceId,
String suffix) |
static boolean |
isSecure(com.netflix.client.config.IClientConfig config,
ServerIntrospector serverIntrospector,
com.netflix.loadbalancer.Server server)
Determine if client is secure.
|
static void |
setRibbonProperty(String serviceId,
String suffix,
String value) |
static URI |
updateToHttpsIfNeeded(URI uri,
com.netflix.client.config.IClientConfig config,
ServerIntrospector serverIntrospector,
com.netflix.loadbalancer.Server server)
Replace the scheme to https if needed.
|
public static final String VALUE_NOT_SET
public static final String DEFAULT_NAMESPACE
public static void setRibbonProperty(String serviceId, String suffix, String value)
public static com.netflix.config.DynamicStringProperty getProperty(String key)
public static boolean isSecure(com.netflix.client.config.IClientConfig config, ServerIntrospector serverIntrospector, com.netflix.loadbalancer.Server server)
IClientConfig
has the CommonClientConfigKey.IsSecure
set, return that value. Otherwise, query the supplied ServerIntrospector
.config
- the supplied client configuration.serverIntrospector
- server
- public static URI updateToHttpsIfNeeded(URI uri, com.netflix.client.config.IClientConfig config, ServerIntrospector serverIntrospector, com.netflix.loadbalancer.Server server)
isSecure(IClientConfig, ServerIntrospector, Server)
is true, update the scheme.
This assumes the uri is already encoded to avoid double encoding.uri
- config
- serverIntrospector
- server
- Copyright © 2017 Pivotal Software, Inc.. All rights reserved.