Package org.jvnet.mock_javamail
Class MockStore
- java.lang.Object
-
- jakarta.mail.Service
-
- jakarta.mail.Store
-
- org.jvnet.mock_javamail.MockStore
-
- All Implemented Interfaces:
AutoCloseable
public class MockStore extends jakarta.mail.Store
Store
backed byMailbox
.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description MockStore(jakarta.mail.Session session, jakarta.mail.URLName urlname)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect()
jakarta.mail.Folder
getDefaultFolder()
jakarta.mail.Folder
getFolder(jakarta.mail.URLName url)
jakarta.mail.Folder
getFolder(String name)
protected boolean
protocolConnect(String host, int port, String user, String password)
-
Methods inherited from class jakarta.mail.Store
addFolderListener, addStoreListener, getPersonalNamespaces, getSharedNamespaces, getUserNamespaces, notifyFolderListeners, notifyFolderRenamedListeners, notifyStoreListeners, removeFolderListener, removeStoreListener
-
-
-
-
Method Detail
-
connect
public void connect() throws jakarta.mail.MessagingException
- Overrides:
connect
in classjakarta.mail.Service
- Throws:
jakarta.mail.MessagingException
-
protocolConnect
protected boolean protocolConnect(String host, int port, String user, String password) throws jakarta.mail.MessagingException
- Overrides:
protocolConnect
in classjakarta.mail.Service
- Throws:
jakarta.mail.MessagingException
-
getDefaultFolder
public jakarta.mail.Folder getDefaultFolder() throws jakarta.mail.MessagingException
- Specified by:
getDefaultFolder
in classjakarta.mail.Store
- Throws:
jakarta.mail.MessagingException
-
getFolder
public jakarta.mail.Folder getFolder(String name) throws jakarta.mail.MessagingException
- Specified by:
getFolder
in classjakarta.mail.Store
- Throws:
jakarta.mail.MessagingException
-
getFolder
public jakarta.mail.Folder getFolder(jakarta.mail.URLName url) throws jakarta.mail.MessagingException
- Specified by:
getFolder
in classjakarta.mail.Store
- Throws:
jakarta.mail.MessagingException
-
-