|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.protocols.smpp.util.AbstractAPIConfig
org.mobicents.protocols.smpp.util.PropertiesAPIConfig
public class PropertiesAPIConfig
Base implementation of the APIConfig which reads its properties
from a Java properties file, loaded from a predefined location.
When initialised, this implementation searches for a file named "smppapi.properties". This file needs to be on the classpath in one of the following locations:
| Field Summary |
|---|
| Fields inherited from interface org.mobicents.protocols.smpp.util.APIConfig |
|---|
BIND_TIMEOUT, DEFAULT_ALPHABET, DEFAULT_VERSION, EVENT_DISPATCHER_CLASS, EVENT_THREAD_POOL_SIZE, LAX_VERSIONS, LINK_AUTO_FLUSH, LINK_AUTOCLOSE_SNOOP, LINK_BUFFERSIZE_IN, LINK_BUFFERSIZE_OUT, LINK_TIMEOUT, SEGMENT_SIZE, TOO_MANY_IO_EXCEPTIONS |
| Constructor Summary | |
|---|---|
PropertiesAPIConfig()
Construct a new APIConfig object which reads properties from the default properties resource. |
|
PropertiesAPIConfig(URL propertiesURL)
Construct a new APIConfig object which reads properties from the specified URL. |
|
| Method Summary | |
|---|---|
String |
getProperty(String property)
Get the value for a property. |
void |
initialise()
Initialise this properties instance. |
boolean |
isSet(String property)
Determine if a property is set in the configuration. |
void |
reconfigure(URL newURL)
Reconfigure this PropertiesAPIConfig to load its properties from a new URL, and reload the configuration. |
boolean |
reloadAPIConfig()
Cause the API properties to be reloaded. |
Object |
remove(String property)
|
void |
setProperty(String property,
String value)
|
| Methods inherited from class org.mobicents.protocols.smpp.util.AbstractAPIConfig |
|---|
convertToNumber, getBoolean, getBoolean, getClassInstance, getClassInstance, getInt, getInt, getLong, getLong, getProperty, getShort, getShort, toBoolean |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mobicents.protocols.smpp.util.APIConfig |
|---|
getBoolean, getBoolean, getClassInstance, getClassInstance, getInt, getInt, getLong, getLong, getProperty, getShort, getShort |
| Constructor Detail |
|---|
public PropertiesAPIConfig()
public PropertiesAPIConfig(URL propertiesURL)
propertiesURL - The URL to read properties from.| Method Detail |
|---|
public boolean isSet(String property)
APIConfig
isSet in interface APIConfigisSet in class AbstractAPIConfigproperty - The name of the property to test.
public void initialise()
APIConfigAPIConfigFactory
will call this method once after it has instantiated the
configuration implementation so that any implementation-specific
actions can be carried out.
initialise in interface APIConfigpublic boolean reloadAPIConfig()
APIConfigfalse will be returned to the caller.
reloadAPIConfig in interface APIConfig
public void reconfigure(URL newURL)
throws IOException
newURL - The new URL to load properties from.
IOException - If the properties cannot be loaded from the
newURL. If this exception is thrown, the API configuration
will be left in an indeterminate state.
public String getProperty(String property)
throws PropertyNotFoundException
APIConfig
getProperty in interface APIConfigproperty - The name of the property to retrieve.
property.
PropertyNotFoundException - if property is
not found in the configuration.
public void setProperty(String property,
String value)
public Object remove(String property)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||