|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.davesag.smpp.util.ConfigUtils
This helps us load objects and properties as well as perform various config tasks.
| Field Summary | |
protected static Log |
log
|
| Constructor Summary | |
ConfigUtils()
|
|
| Method Summary | |
static String |
getError(String err)
get a specific error. |
static Properties |
getErrors()
get the error messages. |
static Properties |
getProperties()
get the general application properties. |
static String |
getProperty(String key)
get a specific property. |
static String |
getResponseFormat(String resp)
get a specific response format. |
static Properties |
getResponses()
get the responses messages. |
static Object |
loadObjectByName(String name)
Uses the default ClassLoader to load the named class, catches all the individual exceptions and rethrows as a more general ClassNotFoundException. |
static Properties |
loadProperties(Class clazz,
String filename)
Load a properties file using a specific class. |
static Properties |
loadProperties(String filename)
Load a properties file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static Log log
| Constructor Detail |
public ConfigUtils()
| Method Detail |
public static Properties getProperties()
public static Properties getResponses()
public static Properties getErrors()
public static String getProperty(String key)
key - The property's key
public static String getError(String err)
err - The error's key
public static String getResponseFormat(String resp)
resp - The response format's key
public static Properties loadProperties(String filename)
throws IOException
filename - The name of the properties file.
IOException
public static Properties loadProperties(Class clazz,
String filename)
throws IOException
clazz - any class in the current classpath. Defaults to this class.filename - The name of the properties file.
IOException
public static Object loadObjectByName(String name)
throws ClassNotFoundException
name - The name of the class to load.
ClassNotFoundException - if anything went wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||