1
2
3
4
5 package net.sf.crispy;
6
7 /**
8 * Intercept the Proxy-Method <code>newInstance</code> and DynamicProxy-Method<code>doInvoke</code> (InvocationHandler), before and after call.
9 *
10 * @author Linke
11 *
12 */
13 public interface Interceptor {
14
15 /** Before call <code>newInstance</code>. */
16 public void beforeNewInstance(Class pvInterfaceClass);
17 /** After call <code>newInstance</code>. */
18 public void afterNewInstance(Class pvInterfaceClass, Object pvProxyObject);
19
20 /** Before call <code>doInvoke</code>. */
21 public void beforeMethodInvocation (InterceptorContext pvInterceptorContext);
22 /** After call <code>doInvoke</code>. */
23 public void afterMethodInvocation (InterceptorContext pvInterceptorContext);
24
25 /** Call if a Exception is thrown. */
26 public void onError (Throwable pvThrowable);
27
28 }