public class POP3Store extends Store
Constructor and Description |
---|
POP3Store(Session session,
URLName url) |
POP3Store(Session session,
URLName url,
java.lang.String name,
boolean isSSL) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
capabilities()
Return a Map of the capabilities the server provided,
as per RFC 2449.
|
void |
close()
Close this service and terminate its connection.
|
Folder |
getDefaultFolder()
Returns a Folder object that represents the 'root' of
the default namespace presented to the user by the Store.
|
Folder |
getFolder(java.lang.String name)
Only the name "INBOX" is supported.
|
Folder |
getFolder(URLName url)
Return a closed Folder object, corresponding to the given
URLName.
|
boolean |
isConnected()
Check whether this store is connected.
|
boolean |
isSSL()
Is this POP3Store using SSL to connect to the server?
|
addFolderListener, addStoreListener, getPersonalNamespaces, getSharedNamespaces, getUserNamespaces, removeFolderListener, removeStoreListener
addConnectionListener, connect, connect, connect, connect, getURLName, removeConnectionListener, toString
public boolean isConnected()
isConnected
in class Service
public void close() throws MessagingException
Service
This implementation uses setConnected(false)
to set
this service's connected state to false
. It will then
send a close ConnectionEvent to any registered ConnectionListeners.
Subclasses overriding this method to do implementation specific
cleanup should call this method as a last step to insure event
notification, probably by including a call to super.close()
in a finally
clause.
close
in interface java.lang.AutoCloseable
close
in class Service
MessagingException
- for errors while closingConnectionEvent
public Folder getDefaultFolder() throws MessagingException
Store
getDefaultFolder
in class Store
MessagingException
- for other failurespublic Folder getFolder(java.lang.String name) throws MessagingException
getFolder
in class Store
name
- The name of the Folder. In some Stores, name can
be an absolute path if it starts with the
hierarchy delimiter. Else it is interpreted
relative to the 'root' of this namespace.MessagingException
- for other failuresFolder.exists()
,
Folder.create(int)
public Folder getFolder(URLName url) throws MessagingException
Store
Implementations of this method may obtain the name of the
actual folder using the getFile()
method on
URLName, and use that name to create the folder.
getFolder
in class Store
url
- URLName that denotes a folderMessagingException
- for other failuresURLName
public java.util.Map<java.lang.String,java.lang.String> capabilities() throws MessagingException
For example, to check if the server supports the STLS capability, use:
if (store.capabilities().containsKey("STLS")) ...
MessagingException
- for failurespublic boolean isSSL()
Copyright © 2010 - 2020 Adobe. All Rights Reserved