1 7 8 9 package javax.management.remote; 10 11 import java.io.Serializable ; 12 import javax.management.Notification ; 13 14 22 public class TargetedNotification implements Serializable { 23 24 private static final long serialVersionUID = 7676132089779300926L; 25 26 44 57 public TargetedNotification(Notification notification, 58 Integer listenerID) { 59 if (notification == null) throw new 62 IllegalArgumentException ("Invalid notification: null"); 63 if (listenerID == null) throw new 64 IllegalArgumentException ("Invalid listener ID: null"); 65 this.notif = notification; 66 this.id = listenerID; 67 } 68 69 74 public Notification getNotification() { 75 return notif; 76 } 77 78 84 public Integer getListenerID() { 85 return id; 86 } 87 88 93 public String toString() { 94 return "{" + notif + ", " + id + "}"; 95 } 96 97 101 private final Notification notif; 102 107 private final Integer id; 108 110 } 117 | Popular Tags |