|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Mailbox
Field Summary | |
---|---|
static long |
ANONYMOUS_SESSION
|
Method Summary | |
---|---|
void |
addListener(MailboxListener listener)
Implementations of Mailbox may interpret the fact that someone is listening and do some caching and even postpone persistence until everyone has removed itself. |
MessageResult |
appendMessage(javax.mail.internet.MimeMessage message,
java.util.Date internalDate,
MessageResult.FetchGroup fetchGroup,
MailboxSession mailboxSession)
|
java.util.Iterator |
expunge(MessageRange set,
MessageResult.FetchGroup fetchGroup,
MailboxSession mailboxSession)
|
MessageResult |
getFirstUnseen(MessageResult.FetchGroup fetchGroup,
MailboxSession mailboxSession)
|
int |
getMessageCount(MailboxSession mailboxSession)
|
java.util.Iterator |
getMessages(MessageRange set,
MessageResult.FetchGroup fetchGroup,
MailboxSession mailboxSession)
TODO: consolidate search and getMessages into a single method |
java.lang.String |
getName()
Example #mail.paul.lists.apache.james-dev (3rd level folder of user paul) |
javax.mail.Flags |
getPermanentFlags()
|
long |
getUidNext(MailboxSession mailboxSession)
|
long |
getUidValidity(MailboxSession mailboxSession)
|
int |
getUnseenCount(MailboxSession mailboxSession)
|
boolean |
isWriteable()
|
long[] |
recent(boolean reset,
MailboxSession mailboxSession)
|
void |
removeListener(MailboxListener listener)
|
java.util.Iterator |
search(SearchQuery searchQuery,
MessageResult.FetchGroup fetchGroup,
MailboxSession mailboxSession)
|
java.util.Iterator |
setFlags(javax.mail.Flags flags,
boolean value,
boolean replace,
MessageRange set,
MessageResult.FetchGroup fetchGroup,
MailboxSession mailboxSession)
this is much more straight forward for IMAP instead of setting Flags of an array of lazy-loading MimeMessages. |
Field Detail |
---|
static final long ANONYMOUS_SESSION
Method Detail |
---|
java.lang.String getName()
MailboxManagerException
int getMessageCount(MailboxSession mailboxSession) throws MailboxManagerException
MailboxManagerException
boolean isWriteable()
java.util.Iterator search(SearchQuery searchQuery, MessageResult.FetchGroup fetchGroup, MailboxSession mailboxSession) throws MailboxManagerException
fetchGroup
- which fields to be returned in MessageResultmailboxSession
- TODO
MailboxManagerException
- if anything went wrong
UnsupportedCriteriaException
- when any of the search parameters are not supported by this
mailboxlong getUidValidity(MailboxSession mailboxSession) throws MailboxManagerException
MailboxManagerException
long getUidNext(MailboxSession mailboxSession) throws MailboxManagerException
mailboxSession
- TODO
MailboxManagerException
javax.mail.Flags getPermanentFlags()
long[] recent(boolean reset, MailboxSession mailboxSession) throws MailboxManagerException
MailboxManagerException
int getUnseenCount(MailboxSession mailboxSession) throws MailboxManagerException
MailboxManagerException
MessageResult getFirstUnseen(MessageResult.FetchGroup fetchGroup, MailboxSession mailboxSession) throws MailboxManagerException
MailboxManagerException
java.util.Iterator expunge(MessageRange set, MessageResult.FetchGroup fetchGroup, MailboxSession mailboxSession) throws MailboxManagerException
set
- fetchGroup
- which fields to be returned in MessageResultmailboxSession
- TODO
MessageResult
Iterator
with the fields
defined by resultMailboxManagerException
- if anything went wrongjava.util.Iterator setFlags(javax.mail.Flags flags, boolean value, boolean replace, MessageRange set, MessageResult.FetchGroup fetchGroup, MailboxSession mailboxSession) throws MailboxManagerException
flags
- Flags to be setvalue
- true = set, false = unsetreplace
- replace all Flags with this flags, value has to be trueset
- the range of messagesfetchGroup
- fetch group for resultsmailboxSession
- TODO
MessageResult
Iterator
containing messages
whose flags have been updated, not null
MailboxManagerException
MessageResult appendMessage(javax.mail.internet.MimeMessage message, java.util.Date internalDate, MessageResult.FetchGroup fetchGroup, MailboxSession mailboxSession) throws MailboxManagerException
internalDate
- IMAP defines this as the time when the message has arrived to this server (by smtp). Clients are also allowed to set the internalDate on apppend.
Is this Mail.getLastUpdates() for James delivery? Should we use MimeMessage.getReceivedDate()?
fetchGroup
- which fields to be returned in MessageResult or null for
minimal fetch group onlymailboxSession
- TODO
MailboxManagerException
- if anything went wrongjava.util.Iterator getMessages(MessageRange set, MessageResult.FetchGroup fetchGroup, MailboxSession mailboxSession) throws MailboxManagerException
set
- mailboxSession
- TODO
MailboxManagerException
void addListener(MailboxListener listener) throws MailboxManagerException
listener
-
MailboxManagerException
void removeListener(MailboxListener listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |