|
||||||||||
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 | |
---|---|
Map<String,String> |
getCopyOfPropertyMap()
|
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)
Get the property of this context. |
StatusManager |
getStatusManager()
|
void |
putObject(String key,
Object value)
Store an object under 'key'. |
void |
putProperty(String key,
String val)
Set a property of this context. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContextBase()
Method Detail |
---|
public StatusManager getStatusManager()
getStatusManager
in interface Context
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()
public void putProperty(String key, String val)
Context
putProperty
in interface Context
public String getProperty(String key)
Context
getProperty
in interface Context
getProperty
in interface PropertyContainer
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 setName(String name) throws IllegalStateException
setName
in interface Context
IllegalStateException
- if the context already has a name, other than "default".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |