KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > dynaop > example > ThrottlingInterceptor


1 package dynaop.example;
2
3 import dynaop.Interceptor;
4 import dynaop.Invocation;
5
6 /**
7  * Slows execution.
8  *
9  * @author Bob Lee (crazybob@crazybob.org)
10  */

11 public class ThrottlingInterceptor implements Interceptor {
12
13     public Object JavaDoc intercept(Invocation invocation) throws Throwable JavaDoc {
14         Thread.sleep(100);
15         return invocation.proceed();
16     }
17
18 }
19
Popular Tags