01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.org
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package example.jmx.timer;
09:
10: import javax.management.NotificationListener;
11: import javax.management.Notification;
12:
13: /**
14: *
15: * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
16: */
17:
18: public class SimpleTimerListener implements NotificationListener {
19: public void handleNotification(Notification notification, Object obj) {
20: System.out.println("Notification: seqNum: "
21: + notification.getSequenceNumber() + ", msg: "
22: + notification.getMessage() + ", handback: " + obj);
23: }
24:
25: public static void main(String[] args) {
26:
27: }
28: }
|