de.saly.javamail.mock2
Class POP3MockFolder

java.lang.Object
  extended by javax.mail.Folder
      extended by com.sun.mail.pop3.POP3Folder
          extended by com.sun.mail.pop3.POP3MockFolder0
              extended by de.saly.javamail.mock2.POP3MockFolder
All Implemented Interfaces:
MailboxFolder.MailboxEventListener

public class POP3MockFolder
extends POP3MockFolder0
implements MailboxFolder.MailboxEventListener


Field Summary
protected  org.slf4j.Logger logger
           
 
Fields inherited from class javax.mail.Folder
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE
 
Constructor Summary
protected POP3MockFolder(POP3MockStore store, MailboxFolder mailboxFolder)
           
 
Method Summary
protected  void checkClosed()
           
protected  void checkOpened()
           
 void close(boolean expunge)
           
 void fetch(javax.mail.Message[] msgs, javax.mail.FetchProfile fp)
           
 void folderCreated(MailboxFolder mf)
           
 void folderDeleted(MailboxFolder mf)
           
 void folderRenamed(String from, MailboxFolder to)
           
 javax.mail.Message getMessage(int msgnum)
           
 int getMessageCount()
           
 javax.mail.Message[] getMessages()
           
 javax.mail.Message[] getMessages(int[] msgnums)
           
 javax.mail.Message[] getMessages(int low, int high)
           
 int getSize()
           
 int[] getSizes()
           
 String getUID(javax.mail.Message msg)
           
 boolean isOpen()
           
 InputStream listCommand()
           
 void messageAdded(MailboxFolder mf, MockMessage msg)
           
 void messageChanged(MailboxFolder mf, MockMessage msg, boolean headerChanged, boolean flagsChanged)
           
 void messageExpunged(MailboxFolder mf, MockMessage msg, boolean removed)
           
 void open(int mode)
           
 void uidInvalidated()
           
 
Methods inherited from class com.sun.mail.pop3.POP3Folder
appendMessages, create, createMessage, delete, exists, expunge, finalize, getFolder, getFullName, getName, getParent, getPermanentFlags, getSeparator, getType, hasNewMessages, list, notifyMessageChangedListeners, renameTo
 
Methods inherited from class javax.mail.Folder
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, copyMessages, getDeletedMessageCount, getMode, getNewMessageCount, getStore, getUnreadMessageCount, getURLName, isSubscribed, list, listSubscribed, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, search, search, setFlags, setFlags, setFlags, setSubscribed, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
Constructor Detail

POP3MockFolder

protected POP3MockFolder(POP3MockStore store,
                         MailboxFolder mailboxFolder)
Method Detail

checkClosed

protected void checkClosed()

checkOpened

protected void checkOpened()
                    throws javax.mail.FolderClosedException
Throws:
javax.mail.FolderClosedException

close

public void close(boolean expunge)
           throws javax.mail.MessagingException
Overrides:
close in class com.sun.mail.pop3.POP3Folder
Throws:
javax.mail.MessagingException

fetch

public void fetch(javax.mail.Message[] msgs,
                  javax.mail.FetchProfile fp)
           throws javax.mail.MessagingException
Overrides:
fetch in class com.sun.mail.pop3.POP3Folder
Throws:
javax.mail.MessagingException

folderCreated

public void folderCreated(MailboxFolder mf)
Specified by:
folderCreated in interface MailboxFolder.MailboxEventListener

folderDeleted

public void folderDeleted(MailboxFolder mf)
Specified by:
folderDeleted in interface MailboxFolder.MailboxEventListener

folderRenamed

public void folderRenamed(String from,
                          MailboxFolder to)
Specified by:
folderRenamed in interface MailboxFolder.MailboxEventListener

getMessage

public javax.mail.Message getMessage(int msgnum)
                              throws javax.mail.MessagingException
Overrides:
getMessage in class com.sun.mail.pop3.POP3Folder
Throws:
javax.mail.MessagingException

getMessageCount

public int getMessageCount()
                    throws javax.mail.MessagingException
Overrides:
getMessageCount in class com.sun.mail.pop3.POP3Folder
Throws:
javax.mail.MessagingException

getMessages

public javax.mail.Message[] getMessages()
                                 throws javax.mail.MessagingException
Overrides:
getMessages in class javax.mail.Folder
Throws:
javax.mail.MessagingException

getMessages

public javax.mail.Message[] getMessages(int low,
                                        int high)
                                 throws javax.mail.MessagingException
Overrides:
getMessages in class javax.mail.Folder
Throws:
javax.mail.MessagingException

getMessages

public javax.mail.Message[] getMessages(int[] msgnums)
                                 throws javax.mail.MessagingException
Overrides:
getMessages in class javax.mail.Folder
Throws:
javax.mail.MessagingException

getSize

public int getSize()
            throws javax.mail.MessagingException
Overrides:
getSize in class com.sun.mail.pop3.POP3Folder
Throws:
javax.mail.MessagingException

getSizes

public int[] getSizes()
               throws javax.mail.MessagingException
Overrides:
getSizes in class com.sun.mail.pop3.POP3Folder
Throws:
javax.mail.MessagingException

getUID

public String getUID(javax.mail.Message msg)
              throws javax.mail.MessagingException
Overrides:
getUID in class com.sun.mail.pop3.POP3Folder
Throws:
javax.mail.MessagingException

isOpen

public boolean isOpen()
Overrides:
isOpen in class com.sun.mail.pop3.POP3Folder

listCommand

public InputStream listCommand()
                        throws javax.mail.MessagingException,
                               IOException
Overrides:
listCommand in class com.sun.mail.pop3.POP3Folder
Throws:
javax.mail.MessagingException
IOException

messageAdded

public void messageAdded(MailboxFolder mf,
                         MockMessage msg)
Specified by:
messageAdded in interface MailboxFolder.MailboxEventListener

messageChanged

public void messageChanged(MailboxFolder mf,
                           MockMessage msg,
                           boolean headerChanged,
                           boolean flagsChanged)
Specified by:
messageChanged in interface MailboxFolder.MailboxEventListener

messageExpunged

public void messageExpunged(MailboxFolder mf,
                            MockMessage msg,
                            boolean removed)
Specified by:
messageExpunged in interface MailboxFolder.MailboxEventListener

open

public void open(int mode)
          throws javax.mail.MessagingException
Overrides:
open in class com.sun.mail.pop3.POP3Folder
Throws:
javax.mail.MessagingException

uidInvalidated

public void uidInvalidated()
Specified by:
uidInvalidated in interface MailboxFolder.MailboxEventListener


Copyright © 2014. All rights reserved.