|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.ContextBase
public class ContextBase
Constructor Summary | |
---|---|
ContextBase()
|
Method Summary | |
---|---|
long |
getBirthTime()
The time at which this context was created, expressed in millisecond elapsed since the epoch (1.1.1970). |
Object |
getConfigurationLock()
Object used for synchronization purposes. |
Map<String,String> |
getCopyOfPropertyMap()
Get a copy of the property map |
ExecutorService |
getExecutorService()
Every context has an ExecutorService which be invoked to execute certain tasks in a separate thread. |
String |
getName()
Contexts are named objects. |
Object |
getObject(String key)
A Context can act as a store for various objects used by LOGBack components. |
String |
getProperty(String key)
Given a key, return the corresponding property value. |
StatusManager |
getStatusManager()
Return the StatusManager instance in use. |
void |
putObject(String key,
Object value)
Store an object under 'key'. |
void |
putProperty(String key,
String val)
Set a property of this context. |
void |
reset()
Clear the internal objectMap and all properties. |
void |
setName(String name)
The context name can be set only if it is not already set, or if the current name is the default context name, namely "default", or if the current name and the old name are the same. |
void |
setStatusManager(StatusManager statusManager)
Set the StatusManager for this context. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ContextBase()
Method Detail |
---|
public StatusManager getStatusManager()
Context
getStatusManager
in interface Context
StatusManager
instance in use.public void setStatusManager(StatusManager statusManager)
StatusManager
for this context. Note that by default this
context is initialized with a BasicStatusManager
. A null value for
the 'statusManager' argument is not allowed.
A malicious attacker can set the status manager to a dummy instance, disabling internal error reporting.
statusManager
- the new status managerpublic Map<String,String> getCopyOfPropertyMap()
Context
getCopyOfPropertyMap
in interface Context
public void putProperty(String key, String val)
Context
putProperty
in interface Context
public String getProperty(String key)
getProperty
in interface Context
getProperty
in interface PropertyContainer
key
-
public Object getObject(String key)
Context
getObject
in interface Context
public void putObject(String key, Object value)
Context
putObject
in interface Context
public String getName()
Context
getName
in interface Context
public void reset()
public void setName(String name) throws IllegalStateException
setName
in interface Context
IllegalStateException
- if the context already has a name, other than "default".public long getBirthTime()
Context
getBirthTime
in interface Context
public Object getConfigurationLock()
Context
getConfigurationLock
in interface Context
public ExecutorService getExecutorService()
Context
getExecutorService
in interface Context
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |