net.fortuna.mstor.connector
Class AbstractFolderDelegate<T extends MessageDelegate>
java.lang.Object
net.fortuna.mstor.connector.AbstractFolderDelegate<T>
- Type Parameters:
T
- the type of message delegate supported
- All Implemented Interfaces:
- FolderDelegate<T>
- Direct Known Subclasses:
- AbstractMetaFolder, MboxFolder, NntpFolder
public abstract class AbstractFolderDelegate<T extends MessageDelegate>
- extends java.lang.Object
- implements FolderDelegate<T>
- Author:
- Ben
$Id$
Created on 21/07/2007
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.fortuna.mstor.connector.FolderDelegate |
appendMessages, close, create, delete, exists, expunge, getFolder, getFolderName, getFullName, getLastModified, getLastUid, getMessage, getMessageAsStream, getMessageCount, getParent, getSeparator, getType, getUidValidity, list, open, renameTo |
AbstractFolderDelegate
public AbstractFolderDelegate()
allocateUid
public final long allocateUid(MessageDelegate message)
throws java.lang.UnsupportedOperationException,
DelegateException
- Allocates a new message UID for the folder.
- Specified by:
allocateUid
in interface FolderDelegate<T extends MessageDelegate>
- Parameters:
message
- the message to allocate a UID value to
- Returns:
- the allocated UID for the specified message
- Throws:
java.lang.UnsupportedOperationException
- if this method is not supported by the folder implementation
DelegateException
- where an error occurs allocating a UID
setLastUid
protected abstract void setLastUid(long uid)
throws java.lang.UnsupportedOperationException,
DelegateException
- Parameters:
uid
- the latest UID for the folder
- Throws:
java.lang.UnsupportedOperationException
- if this method is not supported in the folder delegate
DelegateException
- where an error occurs updating the latest UID
createMessage
protected abstract T createMessage(int messageNumber)
throws DelegateException
- Parameters:
messageNumber
- the message number to associate with the new message
- Returns:
- a new message delegate instance
- Throws:
DelegateException
- where an error occurs creating the delegate
getDeletedMessageCount
public int getDeletedMessageCount()
throws javax.mail.MessagingException,
java.lang.UnsupportedOperationException
- Optional support for more efficient implementation.
- Specified by:
getDeletedMessageCount
in interface FolderDelegate<T extends MessageDelegate>
- Returns:
- the total deleted message count
- Throws:
javax.mail.MessagingException
- where an unexpected error occurs
java.lang.UnsupportedOperationException
- if this method is not supported by the folder implementation
Copyright © 2004-2011 Micronode. All Rights Reserved.