|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.mail.Service
|
+--javax.mail.Store
|
+--com.sun.mail.imap.IMAPStore
This class provides access to an IMAP message store.
Applications that need to make use of IMAP-specific features may cast
a Store object to an IMAPStore object and
use the methods on this class. The getQuota and
setQuota methods support the IMAP QUOTA extension.
Refer to RFC 2087
for more information.
See the com.sun.mail.imap package documentation for further information on the IMAP protocol provider.
WARNING: The APIs unique to this class should be considered EXPERIMENTAL. They may be changed in the future in ways that are incompatible with applications using the current APIs.
| Fields inherited from class javax.mail.Service |
debug, session, url |
| Constructor Summary | |
IMAPStore(Session session,
URLName url)
Constructor that takes a Session object and a URLName that represents a specific IMAP server. |
|
| Method Summary | |
void |
close()
Close this Store. |
protected void |
finalize()
Stop the event dispatcher thread so the queue can be garbage collected. |
Folder |
getDefaultFolder()
Get the default folder, representing the root of this user's namespace. |
Folder |
getFolder(java.lang.String name)
Get named folder. |
Folder |
getFolder(URLName url)
Get named folder. |
Folder[] |
getPersonalNamespaces()
Using the IMAP NAMESPACE command (RFC 2342), return a set of folders representing the Personal namespaces. |
Quota[] |
getQuota(java.lang.String root)
Get the quotas for the named quota root. |
Folder[] |
getSharedNamespaces()
Using the IMAP NAMESPACE command (RFC 2342), return a set of folders representing the Shared namespaces. |
Folder[] |
getUserNamespaces(java.lang.String user)
Using the IMAP NAMESPACE command (RFC 2342), return a set of folders representing the User's namespaces. |
void |
handleResponse(com.sun.mail.iap.Response r)
Response handler method. |
boolean |
isConnected()
Check whether this store is connected. |
protected boolean |
protocolConnect(java.lang.String host,
int pport,
java.lang.String user,
java.lang.String password)
Implementation of protocolConnect() |
void |
setQuota(Quota quota)
Set the quotas for the quota root specified in the quota argument. |
| Methods inherited from class javax.mail.Store |
addFolderListener, addStoreListener, notifyFolderListeners, notifyFolderRenamedListeners, notifyStoreListeners, removeFolderListener, removeStoreListener |
| Methods inherited from class javax.mail.Service |
addConnectionListener, connect, connect, connect, getURLName, notifyConnectionListeners, queueEvent, removeConnectionListener, setConnected, setURLName, toString |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public IMAPStore(Session session,
URLName url)
| Method Detail |
protected boolean protocolConnect(java.lang.String host,
int pport,
java.lang.String user,
java.lang.String password)
throws MessagingException
protocolConnect in class Servicejavax.mail.Servicehost - the name of the host to connect toport - the port to use (-1 means use default port)user - the name of the user to login aspassword - the user's passwordAuthenticationFailedException - for authentication failuresMessagingException - for non-authentication failurespublic boolean isConnected()
isConnected in class Servicejavax.mail.Service
public void close()
throws MessagingException
close in class Servicejavax.mail.ServiceMessagingException - for errors while closingConnectionEvent
protected void finalize()
throws java.lang.Throwable
Servicefinalize in class Service
public Folder getDefaultFolder()
throws MessagingException
getDefaultFolder in class Storejavax.mail.StoreIllegalStateException - if this Store is not connected.
public Folder getFolder(java.lang.String name)
throws MessagingException
getFolder in class Storejavax.mail.Storename - 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.IllegalStateException - if this Store is not connected.Folder.exists(),
Folder.create(int)
public Folder getFolder(URLName url)
throws MessagingException
getFolder in class Storejavax.mail.Storeurl - URLName that denotes a folderIllegalStateException - if this Store is not connected.URLName
public Folder[] getPersonalNamespaces()
throws MessagingException
getPersonalNamespaces in class Storejavax.mail.StoreIllegalStateException - if this Store is not connected.
public Folder[] getUserNamespaces(java.lang.String user)
throws MessagingException
getUserNamespaces in class Storejavax.mail.StoreIllegalStateException - if this Store is not connected.
public Folder[] getSharedNamespaces()
throws MessagingException
getSharedNamespaces in class Storejavax.mail.StoreIllegalStateException - if this Store is not connected.
public Quota[] getQuota(java.lang.String root)
throws MessagingException
root - the name of the quota rootMessagingException - if the server doesn't support the
QUOTA extension
public void setQuota(Quota quota)
throws MessagingException
getQuota method, but it need not be.quota - the quota to setMessagingException - if the server doesn't support the
QUOTA extensionpublic void handleResponse(com.sun.mail.iap.Response r)
handleResponse in interface com.sun.mail.iap.ResponseHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||