- java.lang.Object
-
- jakarta.mail.Service
-
- jakarta.mail.Store
-
- org.eclipse.angus.mail.pop3.POP3Store
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
POP3SSLStore
public class POP3Store extends jakarta.mail.StoreA POP3 Message Store. Contains only one folder, "INBOX". See the org.eclipse.angus.mail.pop3 package documentation for further information on the POP3 protocol provider.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>capabilities()Return a Map of the capabilities the server provided, as per RFC 2449.voidclose()protected voidfinalize()jakarta.mail.FoldergetDefaultFolder()jakarta.mail.FoldergetFolder(jakarta.mail.URLName url)jakarta.mail.FoldergetFolder(java.lang.String name)Only the name "INBOX" is supported.booleanisConnected()Check whether this store is connected.booleanisSSL()Is this POP3Store using SSL to connect to the server?protected booleanprotocolConnect(java.lang.String host, int portNum, java.lang.String user, java.lang.String passwd)-
Methods inherited from class jakarta.mail.Store
addFolderListener, addStoreListener, getPersonalNamespaces, getSharedNamespaces, getUserNamespaces, notifyFolderListeners, notifyFolderRenamedListeners, notifyStoreListeners, removeFolderListener, removeStoreListener
-
-
-
-
Method Detail
-
protocolConnect
protected boolean protocolConnect(java.lang.String host, int portNum, java.lang.String user, java.lang.String passwd) throws jakarta.mail.MessagingException- Overrides:
protocolConnectin classjakarta.mail.Service- Throws:
jakarta.mail.MessagingException
-
isConnected
public boolean isConnected()
Check whether this store is connected. Override superclass method, to actually ping our server connection.- Overrides:
isConnectedin classjakarta.mail.Service
-
close
public void close() throws jakarta.mail.MessagingException- Specified by:
closein interfacejava.lang.AutoCloseable- Overrides:
closein classjakarta.mail.Service- Throws:
jakarta.mail.MessagingException
-
getDefaultFolder
public jakarta.mail.Folder getDefaultFolder() throws jakarta.mail.MessagingException- Specified by:
getDefaultFolderin classjakarta.mail.Store- Throws:
jakarta.mail.MessagingException
-
getFolder
public jakarta.mail.Folder getFolder(java.lang.String name) throws jakarta.mail.MessagingExceptionOnly the name "INBOX" is supported.- Specified by:
getFolderin classjakarta.mail.Store- Throws:
jakarta.mail.MessagingException
-
getFolder
public jakarta.mail.Folder getFolder(jakarta.mail.URLName url) throws jakarta.mail.MessagingException- Specified by:
getFolderin classjakarta.mail.Store- Throws:
jakarta.mail.MessagingException
-
capabilities
public java.util.Map<java.lang.String,java.lang.String> capabilities() throws jakarta.mail.MessagingExceptionReturn a Map of the capabilities the server provided, as per RFC 2449. If the server doesn't support RFC 2449, an emtpy Map is returned. The returned Map can not be modified. The key to the Map is the upper case capability name as a String. The value of the entry is the entire String capability line returned by the server.For example, to check if the server supports the STLS capability, use:
if (store.capabilities().containsKey("STLS")) ...- Returns:
- Map of capabilities
- Throws:
jakarta.mail.MessagingException- for failures- Since:
- JavaMail 1.4.3
-
isSSL
public boolean isSSL()
Is this POP3Store using SSL to connect to the server?- Returns:
- true if using SSL
- Since:
- JavaMail 1.4.6
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjakarta.mail.Service- Throws:
java.lang.Throwable
-
-