com.telapi.api.configuration
Class PropertiesFileTelapiConfiguration
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
com.telapi.api.configuration.PropertiesFileTelapiConfiguration
- All Implemented Interfaces:
- TelapiConfiguration, Serializable, Cloneable, Map<Object,Object>
public class PropertiesFileTelapiConfiguration
- extends Properties
- implements TelapiConfiguration
A TelapiConfiguration implementation which loads the configuration from a file.
- See Also:
TelapiConfiguration,
Serialized Form
| Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
| Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
PropertiesFileTelapiConfiguration
public PropertiesFileTelapiConfiguration()
- Creates a TelapiConfiguration from a file called "telapi.properties" which must be on the classpath.
PropertiesFileTelapiConfiguration
public PropertiesFileTelapiConfiguration(String propFileName)
- Creates a TelapiConfiguration from a file which must be on the classpath.
- Parameters:
propFileName - The fileName of the properties file.
PropertiesFileTelapiConfiguration
public PropertiesFileTelapiConfiguration(FileInputStream is)
- Creates a TelapiConfiguration by loading properties from the provided FileInputStream.
- Parameters:
is - The FileInputStream from which to load the configuration.
getSid
public String getSid()
- Specified by:
getSid in interface TelapiConfiguration
- Returns:
- The account Sid.
getAuthToken
public String getAuthToken()
- Specified by:
getAuthToken in interface TelapiConfiguration
- Returns:
- The authorization token.
getBaseUrl
public String getBaseUrl()
- Specified by:
getBaseUrl in interface TelapiConfiguration
- Returns:
- The base URL. This should be "https://api.telapi.com/" by default.
getProxyHost
public String getProxyHost()
- Specified by:
getProxyHost in interface TelapiConfiguration
- Returns:
- The proxy host (e.g. "192.168.0.1"). Leave null or empty if no proxy is to be used.
getProxyPort
public String getProxyPort()
- Specified by:
getProxyPort in interface TelapiConfiguration
- Returns:
- The proxy port (e.g. 8080). Ignored if no proxy host is set.
getProxyProtocol
public String getProxyProtocol()
- Specified by:
getProxyProtocol in interface TelapiConfiguration
- Returns:
- The proxy protocol (e.g. "http"). Ignored if no proxy host is set.
Copyright © 2012. All Rights Reserved.