|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.aop.interceptor.ExposeInvocationInterceptor
public class ExposeInvocationInterceptor
Interceptor that exposes the current MethodInvocation
as a thread-local object. We occasionally need to do this; for example, when a pointcut
(e.g. an AspectJ expression pointcut) needs to know the full invocation context.
Don't use this interceptor unless this is really necessary. Target objects should not normally know about Spring AOP, as this creates a dependency on Spring API. Target objects should be plain POJOs as far as possible.
If used, this interceptor will normally be the first in the interceptor chain.
Field Summary | |
---|---|
static Advisor |
ADVISOR
Singleton advisor for this class. |
static ExposeInvocationInterceptor |
INSTANCE
Singleton instance of this class |
Method Summary | |
---|---|
static org.aopalliance.intercept.MethodInvocation |
currentInvocation()
Return the AOP Alliance MethodInvocation object associated with the current invocation. |
java.lang.Object |
invoke(org.aopalliance.intercept.MethodInvocation mi)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ExposeInvocationInterceptor INSTANCE
public static final Advisor ADVISOR
Method Detail |
---|
public static org.aopalliance.intercept.MethodInvocation currentInvocation() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if there is no AOP invocation in progress,
or if the ExposeInvocationInterceptor was not added to this interceptor chainpublic java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation mi) throws java.lang.Throwable
invoke
in interface org.aopalliance.intercept.MethodInterceptor
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |