unless anyone jumps in soon with objections or comments, i plan to commit changes that switch to using a session id and events
On Nov 16, 2007 8:01 PM, Robert Burrell Donkin <[EMAIL PROTECTED]> wrote: > ATM the current design for MailboxListener (see 1) is method-oriented > - each event is reported by calling a specific method. extension > requires a new interface. i think that this API should be replaced by > one accepting an event. switching to a messaging API loosens coupling > and allows novel messages to be created without changing the > MailboxAPI. > > opinions? > > ATM mailbox events work by UidChangeTracker noticing that some data > that a mailbox has retrieved differs from it's cached value > > this approach causes problems for protocols such as IMAP that require > events generated by the current session to be handled differently from > events resulting from the actions of other sessions. IMO passing the > listener throw is a poor choice of design and a workaround for deeper > issues. > > IMO an explicit notion of MailboxAPI sessions is going to be required > (setting aside the current interface names). when a mailbox performs > an operation, it should notify listeners of that operation by posting > a suitable event containing a session id. > > opinions? > > - robert > > 1. > http://svn.apache.org/repos/asf/james/server/trunk/core-library/src/main/java/org/apache/james/mailboxmanager/MailboxListener.java > 2. > http://svn.apache.org/repos/asf/james/server/trunk/core-library/src/main/java/org/apache/james/mailboxmanager/tracking/UidChangeTracker.java > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
