Logback API
Version 0.9.8

ch.qos.logback.core
Class ContextBase

java.lang.Object
  extended by ch.qos.logback.core.ContextBase
All Implemented Interfaces:
Context
Direct Known Subclasses:
BasicContext, LoggerContext, RequestLogImpl

public class ContextBase
extends Object
implements Context


Constructor Summary
ContextBase()
           
 
Method Summary
 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.
 Map<String,String> getPropertyMap()
          Get all the properties for this context as a Map.
 StatusManager getStatusManager()
           
 void putObject(String key, Object value)
          Store an object under 'key'.
 void setName(String name)
          The name of the context can be set only once.
 void setProperty(String key, String val)
          Set a property of this context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextBase

public ContextBase()
Method Detail

getStatusManager

public StatusManager getStatusManager()
Specified by:
getStatusManager in interface Context

getPropertyMap

public Map<String,String> getPropertyMap()
Description copied from interface: Context
Get all the properties for this context as a Map. Note that the returned cop might be a copy not the original. Thus, modifying the returned Map will have no effect (on the original.)

Specified by:
getPropertyMap in interface Context
Returns:

setProperty

public void setProperty(String key,
                        String val)
Description copied from interface: Context
Set a property of this context.

Specified by:
setProperty in interface Context

getProperty

public String getProperty(String key)
Description copied from interface: Context
Get the property of this context.

Specified by:
getProperty in interface Context

getObject

public Object getObject(String key)
Description copied from interface: Context
A Context can act as a store for various objects used by LOGBack components.

Specified by:
getObject in interface Context
Returns:
The object stored under 'key'.

putObject

public void putObject(String key,
                      Object value)
Description copied from interface: Context
Store an object under 'key'. If no object can be found, null is returned.

Specified by:
putObject in interface Context

getName

public String getName()
Description copied from interface: Context
Contexts are named objects.

Specified by:
getName in interface Context
Returns:
the name for this context

setName

public void setName(String name)
Description copied from interface: Context
The name of the context can be set only once.

Specified by:
setName in interface Context

Logback API
Version 0.9.8

Copyright © 2005-2008 QOS.ch. All Rights Reserved.