| java.lang.Object org.mockejb.interceptor.InterceptorInvoker
InterceptorInvoker | public class InterceptorInvoker implements Serializable(Code) | | Requests the interceptors from the AspectSystem and
initiates the call to the interceptor chain.
Allows to setup the custom context (properties) that is passed down to interceptors.
Clients can reuse the same object of this class for all method
calls (provided that that the custom context is the same).
author: Alexander Ananiev |
Inner Class :public static class CglibMethodInvoker implements Interceptor | |
Method Summary | |
public Object | getContext(String key) Returns the context associated with the provided key
or null if the key is not found. | public Object | invoke(Object proxyObj, Method proxyMethod, Object targetObj, Method targetMethod, Object[] paramVals) Calls AspectSystem to find the interceptors for the given invokedMethod and
targetMethod, creates the
invocationContext and proceeds to calling the first interceptor.
Parameters: proxyObj - dynamic proxy or the object enhanced by CGLIB. | public void | setContext(String key, Object data) Sets the custom context. |
getContext | public Object getContext(String key)(Code) | | Returns the context associated with the provided key
or null if the key is not found.
Parameters: key - context key context data |
invoke | public Object invoke(Object proxyObj, Method proxyMethod, Object targetObj, Method targetMethod, Object[] paramVals) throws Exception(Code) | | Calls AspectSystem to find the interceptors for the given invokedMethod and
targetMethod, creates the
invocationContext and proceeds to calling the first interceptor.
Parameters: proxyObj - dynamic proxy or the object enhanced by CGLIB. Parameters: proxyMethod - method invoked by the client on the proxy. Normally, this is an interface method(the declaring class is the interface). Parameters: targetObj - object to call, e.g., EJB implementation object Parameters: targetMethod - method to call on the target object, e.g., method of the EJB implementation clsess Parameters: paramVals - method parameters return value |
setContext | public void setContext(String key, Object data)(Code) | | Sets the custom context.
Custome context is the is a piece of data made available
to all interceptors
Parameters: key - key for this context's data Parameters: data - context data |
|
|