|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.core.services.ThreadLocalAdminRuntime
public final class ThreadLocalAdminRuntime
Provides means to change the default configuration name. Usually the extension configuration to use is determined by boot properties found on the classpath. This is correct for applications that only use one configuration. This is not true for administration applications that switch their configurations at runtime.
Switching is done by adding the configuration name to lookup to the thread-local context. This implementation is an easy to use wrapper.
Constructor Summary | |
---|---|
ThreadLocalAdminRuntime() Default constructor. |
Method Summary | |
---|---|
String |
getConfigurationName() Returns the name of the selected configuration. |
static AdminRuntime |
getInstance() Returns the thread-locally stored instance. |
static void |
remove() Delegates to ThreadLocal.remove() . |
static void |
setConfigurationName(String configurationName) Sets the name of the selected configuration. |
String |
toString() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ThreadLocalAdminRuntime()
Method Detail |
---|
public String getConfigurationName()
AdminRuntime
getConfigurationName
in interface
AdminRuntime
null
, if no configuration is selected. In this case the configuration name found in the boot properties is used.
public static void setConfigurationName(String configurationName)
null
, if no configuration is selected. In this case the configuration name found in the boot properties is used.
configurationName
- the name of the selected configuration.
public static AdminRuntime getInstance()
public static void remove()
ThreadLocal.remove()
.
public String toString()
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |