1 29 30 package echo2example.email.faux; 31 32 import javax.mail.Folder ; 33 import javax.mail.MessagingException ; 34 import javax.mail.Session ; 35 import javax.mail.Store ; 36 import javax.mail.URLName ; 37 38 42 public class FauxStore extends Store { 43 44 FauxFolder rootFolder; 45 FauxFolder inboxFolder; 46 47 55 public FauxStore(Session session, URLName urlName) { 56 super(session, urlName); 57 try { 58 rootFolder = FauxFolder.createRoot(this); 59 inboxFolder = FauxFolder.createInbox(this); 60 } catch (Exception ex) { 61 ex.printStackTrace(); 62 } 63 } 64 65 68 public Folder getDefaultFolder() throws MessagingException { 69 return rootFolder; 70 } 71 72 75 public Folder getFolder(String arg0) throws MessagingException { 76 return null; 77 } 78 79 82 public Folder getFolder(URLName arg0) throws MessagingException { 83 return null; 84 } 85 86 89 protected boolean protocolConnect(String arg0, int arg1, String arg2, String arg3) 90 throws MessagingException { 91 return true; 92 } 93 } 94 | Popular Tags |