public interface Context extends PropertyContainer
Modifier and Type | Method and Description |
---|---|
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)
Get the property of this context.
|
StatusManager |
getStatusManager()
Return the StatusManager instance in use.
|
void |
putObject(String key,
Object value)
Store an object under 'key'.
|
void |
putProperty(String key,
String value)
Set a property of this context.
|
void |
register(LifeCycle component)
Register a component that participates in the context's life cycle.
|
void |
setName(String name)
The name of the context.
|
StatusManager getStatusManager()
StatusManager
instance in use.Object getObject(String key)
key
- the key of the objectvoid putObject(String key, Object value)
key
- the key of the objectvalue
- the value to associate with the keyString getProperty(String key)
getProperty
in interface PropertyContainer
key
- the key of the propertyvoid putProperty(String key, String value)
key
- the property's keyvalue
- the value associated with the keyMap<String,String> getCopyOfPropertyMap()
getCopyOfPropertyMap
in interface PropertyContainer
String getName()
void setName(String name)
name
- the desired context namelong getBirthTime()
Object getConfigurationLock()
ExecutorService getExecutorService()
void register(LifeCycle component)
All components registered via this method will be stopped and removed from the context when the context is reset.
component
- the subject componentCopyright © 2005–2014 QOS.ch. All rights reserved.