|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller
public class ThreadLocalUserActivityLoggerInstaller
Helper class to install the IUserActivityLogger with the ThreadLocalUserActivityLogger.
This class should only be used in a few select core olat places to assure a ThreadLocalUserActivityLogger is set up during event handling and in doDispose().
There are two groups of methods in this class: those used for running a piece of code with a guaranteed and managed IUserActivityLogger set in the ThreadLocalUserActivityLogger - and those doing initialization.
Initial Date: 21.10.2009
| Constructor Summary | |
|---|---|
ThreadLocalUserActivityLoggerInstaller()
|
|
| Method Summary | |
|---|---|
static IUserActivityLogger |
createEmptyUserActivityLogger()
FRAMEWORK USE ONLY Returns an empty UserActivityLogger |
static void |
initEmptyUserActivityLogger()
FRAMEWORK USE ONLY Sets the ThreadLocal's UserActivityLogger to a generic one |
static void |
initUserActivityLogger(javax.servlet.http.HttpServletRequest request)
FRAMEWORK USE ONLY Sets the ThreadLocal's UserActivityLogger to a generic one wrapping the given request's session |
static void |
resetUserActivityLogger()
FRAMEWORK USE ONLY Sets the ThreadLocal's UserActivityLogger back to null |
static void |
runWithUserActivityLogger(java.lang.Runnable runnable,
IUserActivityLogger logger)
Run the given runnable with the given IUserActivityLogger as the ThreadLocalUserActivityLogger. |
static void |
runWithUserActivityLoggerWithException(RunnableWithException runnable,
IUserActivityLogger logger)
Run the given runnable (which allows an Exception to be thrown) with the given IUserActivityLogger as the ThreadLocalUserActivityLogger. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadLocalUserActivityLoggerInstaller()
| Method Detail |
|---|
public static void runWithUserActivityLoggerWithException(RunnableWithException runnable,
IUserActivityLogger logger)
throws java.lang.Exception
runnable - the runnable to be runlogger - the logger to be set during the runnable.run call
java.lang.Exception - thrown by runnable.run
public static void runWithUserActivityLogger(java.lang.Runnable runnable,
IUserActivityLogger logger)
runnable - the runnable to be runlogger - the logger to be set during the runnable.run callpublic static void initUserActivityLogger(javax.servlet.http.HttpServletRequest request)
request - public static void initEmptyUserActivityLogger()
request - public static IUserActivityLogger createEmptyUserActivityLogger()
public static void resetUserActivityLogger()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||