Id - public abstract class ListeningMessageSearchIndex<Id> extends Object implements MessageSearchIndex<Id>, MailboxListener
MessageSearchIndex which needs to get registered as global MailboxListener and so get
notified about message changes. This will then allow to update the underlying index.MailboxListener.Added, MailboxListener.Event, MailboxListener.Expunged, MailboxListener.FlagsUpdated, MailboxListener.MailboxACLUpdated, MailboxListener.MailboxAdded, MailboxListener.MailboxDeletion, MailboxListener.MailboxRenamed, MailboxListener.MessageEvent| Constructor and Description |
|---|
ListeningMessageSearchIndex(MessageMapperFactory<Id> factory) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
add(MailboxSession session,
Mailbox<Id> mailbox,
Message<Id> message)
|
abstract void |
delete(MailboxSession session,
Mailbox<Id> mailbox,
MessageRange range)
Delete the
MessageRange for the given Mailbox from the index |
void |
event(MailboxListener.Event event)
Process the
MailboxListener.Event and update the index if
something relevant is received |
protected MessageMapperFactory<Id> |
getFactory()
Return the
MessageMapperFactory |
boolean |
isClosed()
Never closed
|
abstract void |
update(MailboxSession session,
Mailbox<Id> mailbox,
MessageRange range,
javax.mail.Flags flags)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsearchpublic ListeningMessageSearchIndex(MessageMapperFactory<Id> factory)
protected MessageMapperFactory<Id> getFactory()
MessageMapperFactorypublic void event(MailboxListener.Event event)
MailboxListener.Event and update the index if
something relevant is receivedevent in interface MailboxListenerevent - not nullpublic boolean isClosed()
public abstract void add(MailboxSession session, Mailbox<Id> mailbox, Message<Id> message) throws MailboxException
session - mailbox - message - MailboxExceptionpublic abstract void delete(MailboxSession session, Mailbox<Id> mailbox, MessageRange range) throws MailboxException
MessageRange for the given Mailbox from the indexsession - mailbox - range - MailboxExceptionpublic abstract void update(MailboxSession session, Mailbox<Id> mailbox, MessageRange range, javax.mail.Flags flags) throws MailboxException
session - mailbox - range - flags - MailboxExceptionCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.