1 17 18 package org.apache.mailet; 19 20 import javax.mail.MessagingException ; 21 import javax.mail.internet.MimeMessage ; 22 import java.io.Serializable ; 23 import java.util.Collection ; 24 import java.util.Iterator ; 25 26 35 public interface Mail extends Serializable , Cloneable { 36 String GHOST = "ghost"; 37 String DEFAULT = "root"; 38 String ERROR = "error"; 39 String TRANSPORT = "transport"; 40 41 47 MimeMessage getMessage() throws MessagingException ; 48 49 54 Collection getRecipients(); 55 56 61 MailAddress getSender(); 62 63 68 String getState(); 69 70 75 String getRemoteHost(); 76 77 82 String getRemoteAddr(); 83 84 89 String getErrorMessage(); 90 91 96 void setErrorMessage(String msg); 97 98 103 void setMessage(MimeMessage message); 104 105 110 void setState(String state); 111 112 128 Serializable getAttribute(String name); 129 130 138 Iterator getAttributeNames(); 139 140 144 boolean hasAttributes(); 145 146 157 Serializable removeAttribute(String name); 158 159 163 void removeAllAttributes(); 164 165 182 Serializable setAttribute(String name, Serializable object); 183 } 184 | Popular Tags |