james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin" <robertburrelldon...@gmail.com>
Subject [MailboxAPI] Factories Factories Factories
Date Tue, 06 Nov 2007 14:56:13 GMT
the mailbox API is abundently provided with abstract factories (i've
included some UML in http://wiki.apache.org/james/BackendMailboxAPI).
methods seem to be scattered across these three factories without
reason. for example, i see no reason why the provider needs to be
called to get the inbox for a user whereas the manager is called for
most mailboxes.

hopefully someone will jump in here to explain the history behind this design...

AFAICT the main difference between the provider and the manager is
that a user is required for the manager operations (the factory method
requires a user).

i would like to rationalise this design. i can see the advantage of
one abstract factory but three seems excessive to me. so, i think that
it would be useful to consolidate the factory API into MailboxManager.

i think that this probably means that user information is going to
need to be passed in (if anyone can see good alternatives, please jump
in). this may be a good opertunity to introduce an explicit MailboxAPI
session object created by the manager holding user information, a
session ID (for use in events) and so on plus any other state that the
backend may need (for example, database connection information). this
state would be passed into each method but only a single manager would
be required.


- robert

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message