01: /*
02: * Created on 09.05.2005 from Linke
03: *
04: */
05: package net.sf.crispy;
06:
07: /**
08: * Intercept the Proxy-Method <code>newInstance</code> and DynamicProxy-Method<code>doInvoke</code> (InvocationHandler), before and after call.
09: *
10: * @author Linke
11: *
12: */
13: public interface Interceptor {
14:
15: /** Before call <code>newInstance</code>. */
16: public void beforeNewInstance(Class pvInterfaceClass);
17:
18: /** After call <code>newInstance</code>. */
19: public void afterNewInstance(Class pvInterfaceClass,
20: Object pvProxyObject);
21:
22: /** Before call <code>doInvoke</code>. */
23: public void beforeMethodInvocation(
24: InterceptorContext pvInterceptorContext);
25:
26: /** After call <code>doInvoke</code>. */
27: public void afterMethodInvocation(
28: InterceptorContext pvInterceptorContext);
29:
30: /** Call if a Exception is thrown. */
31: public void onError(Throwable pvThrowable);
32:
33: }
|