Log4j 1.3alpha-3

org.apache.log4j.spi
Interface RepositorySelector

All Known Implementing Classes:
ContextJNDISelector, DefaultRepositorySelector

public interface RepositorySelector

The LogManager uses one (and only one) RepositorySelector implementation to select the LoggerRepository for a particular application context.

It is the responsability of the RepositorySelector implementation to track the application context. Log4j makes no assumptions about the application context or on its management.

See also LogManager.

Since:
1.2
Author:
Ceki Gülcü

Method Summary
 LoggerRepository detachRepository(java.lang.String contextName)
          Remove the repository with the given context name from the list maintained by the respository selector.
 LoggerRepository getLoggerRepository()
          Returns a LoggerRepository depending on the context.
 void setDefaultRepository(LoggerRepository def)
          Sets the default repository
 

Method Detail

getLoggerRepository

public LoggerRepository getLoggerRepository()
Returns a LoggerRepository depending on the context. Implementors must make sure that a valid (non-null) LoggerRepository is returned.


setDefaultRepository

public void setDefaultRepository(LoggerRepository def)
Sets the default repository

Since:
1.3

detachRepository

public LoggerRepository detachRepository(java.lang.String contextName)
Remove the repository with the given context name from the list maintained by the respository selector. When applications are stopped or recycled, this method should be called to ensure that the associated repostiroy is recycled as well. If more than one application share the same logging context, then the applications need to coordinate their actions.

Returns:
The LoggerRepository instance that was detached.

Log4j 1.3alpha-3

Copyright 2000-2003 Apache Software Foundation.