Package ch.qos.logback.classic.util
Class ContextSelectorStaticBinder
- java.lang.Object
-
- ch.qos.logback.classic.util.ContextSelectorStaticBinder
-
public class ContextSelectorStaticBinder extends java.lang.Object
Holds the context selector for use in the current environment.- Since:
- 0.9.19
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ContextSelector
contextSelector
(package private) java.lang.Object
key
(package private) static ContextSelectorStaticBinder
singleton
-
Constructor Summary
Constructors Constructor Description ContextSelectorStaticBinder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static ContextSelector
dynamicalContextSelector(LoggerContext defaultLoggerContext, java.lang.String contextSelectorStr)
Instantiate the context selector class designated by the user.ContextSelector
getContextSelector()
static ContextSelectorStaticBinder
getSingleton()
void
init(LoggerContext defaultLoggerContext, java.lang.Object key)
FOR INTERNAL USE.
-
-
-
Field Detail
-
singleton
static ContextSelectorStaticBinder singleton
-
contextSelector
ContextSelector contextSelector
-
key
java.lang.Object key
-
-
Method Detail
-
getSingleton
public static ContextSelectorStaticBinder getSingleton()
-
init
public void init(LoggerContext defaultLoggerContext, java.lang.Object key) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
FOR INTERNAL USE. This method is intended for use by StaticLoggerBinder.- Parameters:
defaultLoggerContext
-- Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
-
dynamicalContextSelector
static ContextSelector dynamicalContextSelector(LoggerContext defaultLoggerContext, java.lang.String contextSelectorStr) throws java.lang.ClassNotFoundException, java.lang.SecurityException, java.lang.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
Instantiate the context selector class designated by the user. The selector must have a constructor taking a LoggerContext instance as an argument.- Parameters:
defaultLoggerContext
-contextSelectorStr
-- Returns:
- an instance of the designated context selector class
- Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
-
getContextSelector
public ContextSelector getContextSelector()
-
-