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 javax.management.timer;
09:
10: import javax.management.Notification;
11:
12: /**
13: * This class provides definitions of the notifications sent by timer MBeans.
14: * <BR>It defines a timer notification identifier which allows to retrieve a timer notification
15: * from the list of notifications of a timer MBean.
16: * <P>
17: * The timer notifications are created and handled by the timer MBean.
18: *
19: * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
20: */
21:
22: public class TimerNotification extends Notification {
23:
24: public static final String TIMER_SCHEDULE = "jmx.timer.schedule";
25:
26: private Integer notificationID;
27:
28: /**
29: * Creates a timer notification object.
30: *
31: * @param type The notification type.
32: * @param source The notification producer.
33: * @param sequenceNumber The notification sequence number within the source object.
34: * @param timeStamp The notification emission date.
35: * @param message The notification message.
36: * @param notifId The notification identifier.
37: *
38: */
39: TimerNotification(String type, Object source, long sequenceNumber,
40: long timeStamp, String message, Integer notifId) {
41: super (type, source, sequenceNumber, timeStamp, message);
42: notificationID = notifId;
43: }
44:
45: public Integer getNotificationID() {
46: return notificationID;
47: }
48:
49: // Object cloneTimerNotification() {
50: // TimerNotification notification = new TimerNotification(getType(), getSource(), getSequenceNumber(), getTimeStamp(), getMessage(), notificationID);
51: // notification.setUserData(getUserData());
52: // return notification;
53: // }
54: }
|