|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 java.util.Properties |
_initProps
default Properties file for Latka |
protected static org.apache.log4j.Category |
_log
log4j category to append output to |
protected static java.lang.ThreadLocal |
_propsThreadLocal
This ThreadLocal is automatically instantiated per thread with a Properties object containing the default properties. |
Constructor Summary | |
---|---|
LatkaProperties()
|
Method Summary | |
---|---|
static java.util.Properties |
getProperties()
Returns the unique Properties object for the current Thread. |
protected static java.util.Properties |
loadDefaultProps()
Loads the default Properties from the first "latka.properties" file located encountered in the classpath. |
protected static java.util.Properties |
loadPropsFromClasspath(java.lang.String classpathLocation)
Load properties specified from context class path |
protected static java.util.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 java.util.Properties _initProps
protected static java.lang.ThreadLocal _propsThreadLocal
Constructor Detail |
---|
public LatkaProperties()
Method Detail |
---|
public static java.util.Properties getProperties()
public static void resetProperties()
protected static java.util.Properties loadDefaultProps()
protected static java.util.Properties loadUserProps()
protected static java.util.Properties loadPropsFromClasspath(java.lang.String classpathLocation) throws java.io.IOException
classpathLocation
- Resource name to load
java.io.IOException
- from loading resource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |