javax.mail
Class Store
public abstract class Store
A message store that can be used to save and retrieve messages.
addConnectionListener , close , connect , connect , connect , connect , getURLName , isConnected , notifyConnectionListeners , protocolConnect , queueEvent , removeConnectionListener , setConnected , setURLName , toString |
Store
protected Store(Session session,
URLName url)
Constructor.
session
- session context for this storeurl
- URLName to be used for this store
addFolderListener
public void addFolderListener(FolderListener l)
Adds a listener for folder events on any folder object obtained from this
store.
addStoreListener
public void addStoreListener(StoreListener l)
Adds a listener for store events on this store.
getDefaultFolder
public abstract Folder getDefaultFolder()
throws MessagingException
Returns a folder that represents the root of the primary namespace
presented to the user by this store.
getFolder
public abstract Folder getFolder(String name)
throws MessagingException
Returns the folder with the given name.
The
exists
method can be used to determine whether the
folder actually exists.
In some Stores,
name
can be an absolute path if it starts
with the hierarchy delimiter. Otherwise it is interpreted relative
to the root of this namespace.
getFolder
public abstract Folder getFolder(URLName url)
throws MessagingException
Returns the folder corresponding to the given URLName.
url
- a URLName denoting a folder
getPersonalNamespaces
public Folder[] getPersonalNamespaces()
throws MessagingException
Returns the personal namespaces for the authenticated user.
getUserNamespaces
public Folder[] getUserNamespaces(String user)
throws MessagingException
Returns the personal namespaces for the specified user.
notifyFolderListeners
protected void notifyFolderListeners(int type,
Folder folder)
Notifies all folder listeners.
notifyFolderRenamedListeners
protected void notifyFolderRenamedListeners(Folder oldFolder,
Folder newFolder)
Notifies all folder listeners about the renaming of a folder.
notifyStoreListeners
protected void notifyStoreListeners(int type,
String message)
Notifies all store event listeners.
removeFolderListener
public void removeFolderListener(FolderListener l)
Removes a folder event listener.
removeStoreListener
public void removeStoreListener(StoreListener l)
Removes a store events listener.
© Copyright 2003, 2004
The Free Software Foundation, All rights reserved