01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package javax.management.timer;
10:
11: import javax.management.Notification;
12:
13: /**
14: * Notifications sent by the {@link Timer} class are instances of this class.
15: *
16: * @version $Revision: 1.10 $
17: */
18: public class TimerNotification extends Notification {
19: private static final long serialVersionUID = 1798492029603825750L;
20:
21: private Integer notificationID;
22:
23: public TimerNotification(String type, Object source,
24: long sequenceNumber, long timeStamp, String message,
25: Integer id) {
26: super (type, source, sequenceNumber, timeStamp, message);
27: this .notificationID = id;
28: }
29:
30: public Integer getNotificationID() {
31: return notificationID;
32: }
33:
34: public String toString() {
35: StringBuffer b = new StringBuffer("[");
36: b.append(super .toString());
37: b.append(", notificationID=").append(notificationID);
38: b.append("]");
39: return b.toString();
40: }
41: }
|