public final class ConfigManager extends Object
ConfigManager loads configuration from 'sdk_config.properties'
file found in the classpath. There are certain default parameters that the
system chooses to use if not seen a part of the configuration. They are
enumerated below with the defaults is parenthesis
http.ConnectionTimeOut(5000 ms), http.Retry(2), http.ReadTimeOut(30000 ms),
http.MaxConnections(100), http.IPAddress(127.0.0.1),
http.GoogleAppEngine(false)| Modifier and Type | Method and Description |
|---|---|
static Properties |
combineDefaultProperties(Properties receivedProperties)
Combines some
Properties with Default Properties |
Map<String,String> |
getConfigurationMap()
Constructs a
Map object from the underlying Properties. |
static Properties |
getDefaultProperties()
Returns the Default
Properties of System Configuration |
static Map<String,String> |
getDefaultSDKMap()
Returns a
Map view of Default Properties |
static ConfigManager |
getInstance()
Singleton accessor method
|
Set<String> |
getNumOfAcct()
Deprecated.
|
String |
getValue(String key)
Deprecated.
|
Map<String,String> |
getValuesByCategory(String category)
Deprecated.
|
String |
getValueWithDefault(String key,
String defaultValue)
Deprecated.
|
boolean |
isPropertyLoaded()
Deprecated.
|
void |
load(InputStream is)
Deprecated.
|
void |
load(Properties properties)
Deprecated.
|
public static ConfigManager getInstance()
public static Properties getDefaultProperties()
Properties of System ConfigurationPropertiespublic static Map<String,String> getDefaultSDKMap()
Map view of Default PropertiesMap view of Default Propertiespublic static Properties combineDefaultProperties(Properties receivedProperties)
Properties with Default PropertiesreceivedProperties - Properties used to combine with Default PropertiesPropertiespublic void load(InputStream is) throws IOException
InputStreamis - InputStreamIOExceptionpublic void load(Properties properties)
Properties
instanceproperties - Properties instancepublic Map<String,String> getConfigurationMap()
Map object from the underlying Properties.
The Properties object is loaded for 'sdk_config.properties' file
in the classpathMappublic String getValue(String key)
key - String keypublic String getValueWithDefault(String key, String defaultValue)
Properties.getProperty(key, defaultValue)key - String key to search in properties filedefaultValue - Default value to be sent in case of a misspublic Map<String,String> getValuesByCategory(String category)
category - public Set<String> getNumOfAcct()
Set of Accountspublic boolean isPropertyLoaded()
Copyright © 2016. All Rights Reserved.