Return-Path: Delivered-To: apmail-james-server-dev-archive@www.apache.org Received: (qmail 71144 invoked from network); 6 Nov 2007 14:56:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2007 14:56:44 -0000 Received: (qmail 410 invoked by uid 500); 6 Nov 2007 14:56:31 -0000 Delivered-To: apmail-james-server-dev-archive@james.apache.org Received: (qmail 384 invoked by uid 500); 6 Nov 2007 14:56:31 -0000 Mailing-List: contact server-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "James Developers List" Reply-To: "James Developers List" Delivered-To: mailing list server-dev@james.apache.org Received: (qmail 373 invoked by uid 99); 6 Nov 2007 14:56:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 06:56:31 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robertburrelldonkin@gmail.com designates 209.85.198.186 as permitted sender) Received: from [209.85.198.186] (HELO rv-out-0910.google.com) (209.85.198.186) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 14:56:35 +0000 Received: by rv-out-0910.google.com with SMTP id b22so1563359rvf for ; Tue, 06 Nov 2007 06:56:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=xVHJatJtCtNkPXCDDhIPdZGNa4q4/9KEvcUH+Aj9wQk=; b=V+pYNkyz2mEH3+2uFY5j12zS03EkwbNXZy2HISkHkZesxba4VfUNb41vyCv8HRkfXlaV+KG/gGVNPqjDBSJLECBmROZCXkdR6odB0OS68JVJegZbKgTZg/7jaIFwaLtyfj0zaTm+3LxVEAjouy0XdiUSnoF5EaWp0Z6MRSRWSx4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Px3a9bdgOYbblFkKHt5OdzaCxwnd/zmD7xbefk7g7LnGxGcdtKJ9spdYYEQJAfYjE9PMw2Syx+2BVeyzEGCR2pNpRQOIgH79+mdYOHOpMgocVRxfnB6a1TEoKgGzkFYUYFSw2hMwi/lEKdehcz0Ltw9Voq3XKofOM52r5bD+YtI= Received: by 10.114.183.1 with SMTP id g1mr4357021waf.1194360973072; Tue, 06 Nov 2007 06:56:13 -0800 (PST) Received: by 10.114.80.5 with HTTP; Tue, 6 Nov 2007 06:56:13 -0800 (PST) Message-ID: Date: Tue, 6 Nov 2007 14:56:13 +0000 From: "Robert Burrell Donkin" To: "James Developers List" Subject: [MailboxAPI] Factories Factories Factories MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org 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. opinions? - robert --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org For additional commands, e-mail: server-dev-help@james.apache.org