org.apache.geronimo.javamail.store.pop3
Class POP3Folder
java.lang.Object
javax.mail.Folder
org.apache.geronimo.javamail.store.pop3.POP3Folder
- public class POP3Folder
- extends Folder
The POP3 implementation of the javax.mail.Folder Note that only INBOX is
supported in POP3
http://www.faqs.org/rfcs/rfc1939.html
- Version:
- $Rev: 432884 $ $Date: 2006-08-19 14:53:20 -0700 (Sat, 19 Aug 2006) $
- See Also:
Folder
Methods inherited from class javax.mail.Folder |
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, copyMessages, finalize, getDeletedMessageCount, getMessages, getMessages, getMessages, getNewMessageCount, getStore, getUnreadMessageCount, getURLName, isSubscribed, list, listSubscribed, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, search, search, setFlags, setFlags, setFlags, setSubscribed, toString |
POP3Folder
protected POP3Folder(Store store,
URLName url)
POP3Folder
protected POP3Folder(Store store,
Session session,
POP3Connection pop3Con)
getName
public String getName()
getFullName
public String getFullName()
getParent
public Folder getParent()
throws MessagingException
- Never return "this" as the parent folder. Somebody not familliar with
POP3 may do something like while(getParent() != null) or something
simmilar which will result in an infinte loop
- Throws:
MessagingException
exists
public boolean exists()
throws MessagingException
- Throws:
MessagingException
list
public Folder[] list(String pattern)
throws MessagingException
- Throws:
MessagingException
getSeparator
public char getSeparator()
throws MessagingException
- No sub folders, hence there is no notion of a seperator
- Throws:
MessagingException
getType
public int getType()
throws MessagingException
- Throws:
MessagingException
create
public boolean create(int type)
throws MessagingException
- Throws:
MessagingException
hasNewMessages
public boolean hasNewMessages()
throws MessagingException
- Throws:
MessagingException
getFolder
public Folder getFolder(String name)
throws MessagingException
- Throws:
MessagingException
delete
public boolean delete(boolean recurse)
throws MessagingException
- Throws:
MessagingException
renameTo
public boolean renameTo(Folder f)
throws MessagingException
- Throws:
MessagingException
open
public void open(int mode)
throws MessagingException
- Throws:
MessagingException
- See Also:
Folder.open(int)
close
public void close(boolean expunge)
throws MessagingException
- Throws:
MessagingException
isOpen
public boolean isOpen()
getPermanentFlags
public Flags getPermanentFlags()
getMessageCount
public int getMessageCount()
throws MessagingException
- Throws:
MessagingException
getMessage
public Message getMessage(int msgNum)
throws MessagingException
- Checks wether the message is in cache, if not will create a new message
object and return it.
- Throws:
MessagingException
- See Also:
Folder.getMessage(int)
appendMessages
public void appendMessages(Message[] msgs)
throws MessagingException
- Throws:
MessagingException
expunge
public Message[] expunge()
throws MessagingException
- Throws:
MessagingException
getMode
public int getMode()
throws IllegalStateException
- Throws:
IllegalStateException
fetch
public void fetch(Message[] msgs,
FetchProfile fp)
throws MessagingException
- Throws:
MessagingException
- See Also:
The JavaMail API recommends that this method be overrident to provide a
meaningfull implementation.
notifyMessageChangedListeners
public void notifyMessageChangedListeners(int type,
Message m)
- See Also:
this method is protected and cannot be used outside of Folder, therefore
had to explicitly expose it via a method in POP3Folder, so that
POP3Message has access to it
Bad design on the part of the Java Mail API.
Copyright © 2006 Apache Software Foundation. All Rights Reserved.