KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > dynaop > example > TimeChangeInterceptor


1 package dynaop.example;
2
3 import dynaop.DispatchInterceptor;
4
5 /**
6  * Intercepts setTime(long). Prints message when time changes.
7  *
8  * @author Bob Lee (crazybob@crazybob.org)
9  */

10 public class TimeChangeInterceptor extends DispatchInterceptor {
11
12     public void setTime(long time) throws Throwable JavaDoc {
13         System.out.println("=> Time changed to " + time + ".");
14         proceed();
15     }
16 }
17
Popular Tags