home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / jmx.jar / javax / management / timer / TimerNotification.class (.txt) < prev   
Encoding:
Java Class File  |  2002-10-28  |  1.4 KB  |  31 lines

  1. package javax.management.timer;
  2.  
  3. import javax.management.Notification;
  4.  
  5. public class TimerNotification extends Notification {
  6.    private static final long serialVersionUID = 1798492029603825750L;
  7.    private static long m_sequenceNumber;
  8.    private Integer notificationID;
  9.  
  10.    TimerNotification(String type, Object source, String message, Integer id) {
  11.       super(type, source, getNextSequenceNumber(), System.currentTimeMillis(), message);
  12.       this.notificationID = id;
  13.    }
  14.  
  15.    public Integer getNotificationID() {
  16.       return this.notificationID;
  17.    }
  18.  
  19.    private static synchronized long getNextSequenceNumber() {
  20.       return (long)(m_sequenceNumber++);
  21.    }
  22.  
  23.    public String toString() {
  24.       StringBuffer b = new StringBuffer("[");
  25.       b.append(super.toString());
  26.       b.append(", notificationID=").append(this.notificationID);
  27.       b.append("]");
  28.       return b.toString();
  29.    }
  30. }
  31.