|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.latka.LatkaProperties
public class LatkaProperties
Stores properties for Latka. This class is backed by a
ThreadLocal variable, so every Thread is guaranteed to
get a unique Properties object. Note, however, that
inside an environment utilizing a Thread pool, such
as many Servlet engines, it is possible for
the Properties object to travel quite widely. Use the
resetProperties()
method to reset the Properties
object for a Thread to its default values.
Field Summary | |
---|---|
protected static Properties |
_initProps
default Properties file for Latka |
protected static org.apache.log4j.Category |
_log
log4j category to append output to |
protected static ThreadLocal |
_propsThreadLocal
This ThreadLocal is automatically instantiated per thread with a Properties object containing the default properties. |
Constructor Summary | |
---|---|
LatkaProperties()
|
Method Summary | |
---|---|
static Properties |
getProperties()
Returns the unique Properties object for the current Thread. |
protected static Properties |
loadDefaultProps()
Loads the default Properties from the first "latka.properties" file located encountered in the classpath. |
protected static Properties |
loadPropsFromClasspath(String classpathLocation)
Load properties specified from context class path |
protected static Properties |
loadUserProps()
Load latka.properties from classpath |
static void |
resetProperties()
Resets the Latka properties to their initial value (getProperties() will still return the same Object). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Category _log
protected static Properties _initProps
protected static ThreadLocal _propsThreadLocal
Constructor Detail |
---|
public LatkaProperties()
Method Detail |
---|
public static Properties getProperties()
public static void resetProperties()
protected static Properties loadDefaultProps()
protected static Properties loadUserProps()
protected static Properties loadPropsFromClasspath(String classpathLocation) throws IOException
classpathLocation
- Resource name to load
IOException
- from loading resource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |