- All Implemented Interfaces:
MethodInvocationas 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.
- Rod Johnson, Juergen Hoeller
- See Also:
Field SummaryModifier and TypeFieldDescription
static final AdvisorSingleton advisor for this class.
static final ExposeInvocationInterceptorSingleton instance of this class.
Method SummaryModifier and TypeMethodDescription
static MethodInvocationReturn the AOP Alliance MethodInvocation object associated with the current invocation.
getOrder()Get the order value of this object.Implement this method to perform extra treatments before and after the invocation.
INSTANCEpublic static final ExposeInvocationInterceptor INSTANCESingleton instance of this class.
ADVISORpublic static final Advisor ADVISORSingleton advisor for this class. Use in preference to INSTANCE when using Spring AOP, as it prevents the need to create a new Advisor to wrap the instance.
currentInvocationReturn the AOP Alliance MethodInvocation object associated with the current invocation.
- the invocation object associated with the current invocation
IllegalStateException- if there is no AOP invocation in progress, or if the ExposeInvocationInterceptor was not added to this interceptor chain
invokeDescription copied from interface:
MethodInterceptorImplement this method to perform extra treatments before and after the invocation. Polite implementations would certainly like to invoke
getOrderpublic int getOrder()Description copied from interface:
OrderedGet the order value of this object.
Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet
Same order values will result in arbitrary sort positions for the affected objects.