home *** CD-ROM | disk | FTP | other *** search
- package javax.management.timer;
-
- import javax.management.Notification;
-
- public class TimerNotification extends Notification {
- private static final long serialVersionUID = 1798492029603825750L;
- private static long m_sequenceNumber;
- private Integer notificationID;
-
- TimerNotification(String type, Object source, String message, Integer id) {
- super(type, source, getNextSequenceNumber(), System.currentTimeMillis(), message);
- this.notificationID = id;
- }
-
- public Integer getNotificationID() {
- return this.notificationID;
- }
-
- private static synchronized long getNextSequenceNumber() {
- return (long)(m_sequenceNumber++);
- }
-
- public String toString() {
- StringBuffer b = new StringBuffer("[");
- b.append(super.toString());
- b.append(", notificationID=").append(this.notificationID);
- b.append("]");
- return b.toString();
- }
- }
-