1 19 20 package org.apache.james.imapserver.mock; 21 22 import java.io.InputStream ; 23 import java.util.Collection ; 24 import java.util.HashMap ; 25 import java.util.Map ; 26 27 import javax.mail.MessagingException ; 28 import javax.mail.internet.MimeMessage ; 29 30 import org.apache.james.imapserver.TestConstants; 31 import org.apache.james.services.MailRepository; 32 import org.apache.james.services.MailServer; 33 import org.apache.mailet.Mail; 34 import org.apache.mailet.MailAddress; 35 36 public class MockMailServer implements MailServer, TestConstants 37 { 38 39 public void sendMail(MailAddress sender, Collection recipients, 40 MimeMessage msg) throws MessagingException 41 { 42 throw new RuntimeException ("not implemented"); 43 44 } 45 46 public void sendMail(MailAddress sender, Collection recipients, 47 InputStream msg) throws MessagingException 48 { 49 throw new RuntimeException ("not implemented"); 50 } 51 52 public void sendMail(Mail mail) throws MessagingException 53 { 54 throw new RuntimeException ("not implemented"); 55 } 56 57 public void sendMail(MimeMessage message) throws MessagingException 58 { 59 throw new RuntimeException ("not implemented"); 60 } 61 62 Map userToMailRepo = new HashMap (); 63 64 public MailRepository getUserInbox(String userName) { 65 return null; 66 } 67 68 public String getId() 69 { 70 throw new RuntimeException ("not implemented"); 71 } 72 73 public boolean addUser(String userName, String password) 74 { 75 throw new RuntimeException ("not implemented"); 76 } 77 78 public boolean isLocalServer(String serverName) 79 { 80 throw new RuntimeException ("not implemented"); 81 } 82 83 public boolean supportVirtualHosting() { 84 return false; 85 } 86 87 public String getDefaultDomain() { 88 return "localhost"; 89 } 90 91 public String getHelloName() { 92 return "localhost"; 93 } 94 95 } 96 | Popular Tags |