org.mockejb.interceptor
Interface Interceptor
- All Known Subinterfaces:
- Aspect
- All Known Implementing Classes:
- BMPFinderHandler, CMPFindByPrimaryKeyHandler, EjbExceptionHandler, InterceptorInvoker.CglibMethodInvoker, InvocationRecorder, TransactionManager
- public interface Interceptor
Interceptors intercept calls to an object to perform some actions, such as logging,
transaction management and so on.
Interceptor can perform actions before the call, then it must call the
proceed
method
and after that it can perform post-call actions if needed.
- Author:
- Alexander Ananiev
Method Summary |
void |
intercept(InvocationContext invocationContext)
Performs pre and post invocation actions for the target object call. |
intercept
public void intercept(InvocationContext invocationContext)
throws java.lang.Exception
- Performs pre and post invocation actions for the target object call.
- Parameters:
invocationContext
- provides the info about this call. Also calls interceptors in
turn according to their order in the chain. invocationContext provides access to the return value
and thrown exceptions of this call.
- Throws:
java.lang.Exception