Logback API
Version 0.9.8

ch.qos.logback.core
Interface Context

All Known Implementing Classes:
BasicContext, ContextBase, LogbackValve, LoggerContext, RequestLogImpl

public interface Context


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 value)
          Set a property of this context.
 

Method Detail

getStatusManager

StatusManager getStatusManager()

getObject

Object getObject(String key)
A Context can act as a store for various objects used by LOGBack components.

Returns:
The object stored under 'key'.

putObject

void putObject(String key,
               Object value)
Store an object under 'key'. If no object can be found, null is returned.

Parameters:
key -
value -

getPropertyMap

Map<String,String> getPropertyMap()
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.)

Returns:

getProperty

String getProperty(String key)
Get the property of this context.


setProperty

void setProperty(String key,
                 String value)
Set a property of this context.


getName

String getName()
Contexts are named objects.

Returns:
the name for this context

setName

void setName(String name)
The name of the context can be set only once.

Parameters:
name -

Logback API
Version 0.9.8

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