Class ThreadLocalMethodHooks
java.lang.Object
com.atlassian.confluence.impl.profiling.ThreadLocalMethodHooks
Provides a mechanism to register thread-local interceptors for arbitrary method calls.
Note that in order for this to work, the AOP interceptor returned by
advice() needs to be
incorporated into a Spring proxy.- Since:
- 7.14
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.aop.MethodBeforeAdviceadvice()static voidregisterHook(Method method, org.springframework.aop.MethodBeforeAdvice hook) Register the given hook to run against any cal to the given method on the current thread.static voidUnregister any method hooks registered on the current thread.
-
Method Details
-
advice
public static org.springframework.aop.MethodBeforeAdvice advice()- Returns:
- a method interceptor that will invoke any hooks registered for the current thread.
-
registerHook
Register the given hook to run against any cal to the given method on the current thread. -
unregisterHooks
public static void unregisterHooks()Unregister any method hooks registered on the current thread.
-