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.
use
initConfig() instead |
void |
load(Properties properties)
Deprecated.
use
initConfig() instead |
public static ConfigManager getInstance()
public static Properties getDefaultProperties()
Properties
of System ConfigurationProperties
public static Map<String,String> getDefaultSDKMap()
Map
view of Default Properties
Map
view of Default Properties
public static Properties combineDefaultProperties(Properties receivedProperties)
Properties
with Default Properties
receivedProperties
- Properties used to combine with Default Properties
Properties
public void load(InputStream is) throws IOException
initConfig()
insteadInputStream
is
- InputStreamIOException
public void load(Properties properties)
initConfig()
insteadProperties
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 classpathMap
public 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 © 2015. All Rights Reserved.