public abstract class AbstractDelegatingMailboxListener extends Object implements MailboxListener, MailboxListenerSupport
MailboxListener.Added, MailboxListener.Event, MailboxListener.Expunged, MailboxListener.FlagsUpdated, MailboxListener.MailboxACLUpdated, MailboxListener.MailboxAdded, MailboxListener.MailboxDeletion, MailboxListener.MailboxRenamed, MailboxListener.MessageEvent| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDelegatingMailboxListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalListener(MailboxListener listener,
MailboxSession session)
Add a
MailboxListener which get fired for ever
MailboxPath |
void |
addListener(MailboxPath path,
MailboxListener listener,
MailboxSession session)
Implementations of Mailbox may interpret the fact that someone is
listening and do some caching and even postpone persistence until
everyone has removed itself.
|
void |
event(MailboxListener.Event event)
Receive the event and dispatch it to the right
MailboxListener depending on
MailboxListener.Event.getMailboxPath() |
protected abstract List<MailboxListener> |
getGlobalListeners()
Return the
List which is used tos tore the global MailboxListener |
protected abstract Map<MailboxPath,List<MailboxListener>> |
getListeners()
Return the
Map which is used to store the MailboxListener |
void |
removeGlobalListener(MailboxListener listener,
MailboxSession session)
Remove the
MailboxListener |
void |
removeListener(MailboxPath mailboxPath,
MailboxListener listener,
MailboxSession session)
Remove the
MailboxListener |
public void event(MailboxListener.Event event)
MailboxListener depending on
MailboxListener.Event.getMailboxPath()event in interface MailboxListenerevent - not nullpublic void addListener(MailboxPath path, MailboxListener listener, MailboxSession session) throws MailboxException
MailboxListenerSupportImplementations of Mailbox may interpret the fact that someone is listening and do some caching and even postpone persistence until everyone has removed itself.
addListener in interface MailboxListenerSupportpath - not nulllistener - not nullsession - not nullMailboxExceptionMailboxListenerSupport.addListener(org.apache.james.mailbox.model.MailboxPath, org.apache.james.mailbox.MailboxListener, org.apache.james.mailbox.MailboxSession)public void addGlobalListener(MailboxListener listener, MailboxSession session) throws MailboxException
MailboxListenerSupportMailboxListener which get fired for ever
MailboxPathaddGlobalListener in interface MailboxListenerSupportMailboxExceptionMailboxListenerSupport.addGlobalListener(org.apache.james.mailbox.MailboxListener, org.apache.james.mailbox.MailboxSession)public void removeListener(MailboxPath mailboxPath, MailboxListener listener, MailboxSession session) throws MailboxException
MailboxListenerSupportMailboxListenerpublic void removeGlobalListener(MailboxListener listener, MailboxSession session) throws MailboxException
MailboxListenerSupportMailboxListenerremoveGlobalListener in interface MailboxListenerSupportMailboxExceptionMailboxListenerSupport.removeGlobalListener(org.apache.james.mailbox.MailboxListener, org.apache.james.mailbox.MailboxSession)protected abstract Map<MailboxPath,List<MailboxListener>> getListeners()
Map which is used to store the MailboxListenerprotected abstract List<MailboxListener> getGlobalListeners()
List which is used tos tore the global MailboxListenerCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.