Am Montag, den 04.09.2006, 19:24 +0200 schrieb Norman Maurer: <snip> > > The HashJavamailStoreMailRepository is not so performant but we may try > > to find out how to make the mstor folder to implement the UidPlusFolder > > interface later. (maybe this is not easy, maybe we should talk with Ben > > Fortuna about this). > > > > +1 !!! > > Stefano > > I will ask Ben to join us.
I posted this message to the mstor mailinglist. Let us see what Ben
answer:
Unique id per message when stored
2006-09-04 20:38 Hi Ben,
we develop a java mail server named james ( james.apache.org ). We
thought about to use mstor to provide a backend for mbox. We need to
have a persist unique uid (key) per message we add to retrieve the mail
later by using the "unique" id. Any idea how to adapted this ?
Here his the interface we using for such needs:
package org.apache.james.mailrepository.javamail;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.UIDFolder;
/**
* Interim interface to provide access to UID PLUS methods reflecting RFC
2359,
* until official Javamail API offers this.
*/
public interface UIDPlusFolder extends UIDFolder, FolderInterface {
/**
* Appends the given messages to the folder and returns corresponding
uids.<br>
* Implementations may require the folder to be open.
*
* @see javax.mail.Folder#appendMessages(javax.mail.Message[])
*
* @param msgs
* messages to append
* @return array of same size and sequenze of msgs containing
corresponding
* uids or -1, if something went wrong
* @throws MessagingException
* @throws IllegalStateException when folder has to be open
*/
public long[] addUIDMessages(Message[] msgs) throws MessagingException;
/**
* Appends the given messages to the folder and returns corresponding
* instances of the appended messages.<br>
* Implementations may require the folder to be open.
*
* @see javax.mail.Folder#appendMessages(javax.mail.Message[])
*
* @param msgs
* messages to append
* @return array of same size and sequenze of msgs containing
corresponding
* added messages or null, if something went wrong
* @throws MessagingException
* @throws IllegalStateException when folder has to be open
*/
public Message[] addMessages(Message[] msgs) throws MessagingException;
}
bye
Norman
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
