1 5 package net.sf.panoptes.component.jmx.model; 6 7 import java.util.Collection ; 8 import java.util.Vector ; 9 10 import javax.management.Notification ; 11 12 18 public class NotificationRegistry { 19 20 21 private Vector notifications = new Vector (); 22 private static NotificationRegistry instance; 23 24 public static NotificationRegistry getInstance() { 25 if (instance == null) instance = new NotificationRegistry(); 26 return instance; 27 } 28 29 public void addNotification(Notification notification) { 30 notifications.add(notification); 31 } 32 33 public Collection getNotifications() { 34 return new Vector (notifications); 35 36 } 37 } 38 | Popular Tags |