public class ConfigUtil
extends java.lang.Object
| Constructor and Description |
|---|
ConfigUtil() |
| Modifier and Type | Method and Description |
|---|---|
static javax.net.ssl.HostnameVerifier |
createHostnameVerifier(Config config)
Create the HostnameVerifier from configuration in the passed
Config object. |
static javax.net.ssl.SSLSocketFactory |
createSSLFactory(Config config)
Create the
javax.net.ssl.SSLSocketFactory from configuration in the passed Config object. |
static java.lang.String |
getConfigWithFallbackLookup(Config c,
java.lang.String key,
java.lang.String fallbackKey)
Resolve the configuration value for the key as a string.
|
static int |
getConnectTimeout(Config config)
Resolve the value of the
Config.OAUTH_CONNECT_TIMEOUT_SECONDS configuration |
static int |
getReadTimeout(Config config)
Resolve the value of the
Config.OAUTH_READ_TIMEOUT_SECONDS configuration |
static int |
getTimeout(Config c,
java.lang.String key)
Resolve the configuration value for the key as a timeout in seconds with the default value of 60
|
static int |
getTimeoutConfigWithFallbackLookup(Config c,
java.lang.String key,
java.lang.String fallbackKey)
Resolve the configuration value for the key as a timeout in seconds with the default value of 60.
|
static void |
putIfNotNull(java.util.Properties p,
java.lang.String key,
java.lang.Object value)
Helper method that puts the key-value pair into the passed
java.util.Properties only if
the value is not null. |
public static javax.net.ssl.SSLSocketFactory createSSLFactory(Config config)
javax.net.ssl.SSLSocketFactory from configuration in the passed Config object.config - The Config object containing the configurationjavax.net.ssl.SSLSocketFactory based on the passed configurationpublic static javax.net.ssl.HostnameVerifier createHostnameVerifier(Config config)
Config object.config - The Config object containing the configurationjavax.net.ssl.HostnameVerifier based on the passed configurationpublic static void putIfNotNull(java.util.Properties p,
java.lang.String key,
java.lang.Object value)
java.util.Properties only if
the value is not null.p - Destination Properties objectkey - The keyvalue - The valuepublic static int getConnectTimeout(Config config)
Config.OAUTH_CONNECT_TIMEOUT_SECONDS configurationconfig - the Config objectpublic static int getReadTimeout(Config config)
Config.OAUTH_READ_TIMEOUT_SECONDS configurationconfig - the Config objectpublic static int getTimeout(Config c, java.lang.String key)
c - the Config objectkey - the configuration keypublic static int getTimeoutConfigWithFallbackLookup(Config c, java.lang.String key, java.lang.String fallbackKey)
c - the Config objectkey - the configuration keyfallbackKey - the fallback keypublic static java.lang.String getConfigWithFallbackLookup(Config c, java.lang.String key, java.lang.String fallbackKey)
c - the Config objectkey - the configuration keyfallbackKey - the fallback keyCopyright © 2023. All rights reserved.