1 21 22 27 28 package javax.mail.event; 29 30 import java.util.*; 31 import javax.mail.*; 32 33 41 42 public class StoreEvent extends MailEvent { 43 44 47 public static final int ALERT = 1; 48 49 52 public static final int NOTICE = 2; 53 54 59 protected int type; 60 61 66 protected String message; 67 68 private static final long serialVersionUID = 1938704919992515330L; 69 70 74 public StoreEvent(Store store, int type, String message) { 75 super(store); 76 this.type = type; 77 this.message = message; 78 } 79 80 87 public int getMessageType() { 88 return type; 89 } 90 91 96 public String getMessage() { 97 return message; 98 } 99 100 103 public void dispatch(Object listener) { 104 ((StoreListener )listener).notification(this); 105 } 106 } 107 | Popular Tags |