Serge Knystautas wrote: > > I would agree to use JavaMail as well. IMHO, let's just stick to one > API, and when we're ready to roll-our-own to improve > performance, then > all our code using JavaMail can benefit instead of just the Sieve > proposal or just this or that.
Taking both Serge's, Noel's and my own comments on board, I had took a step outside and came up with a solution that will hopefully satisfy all concerns. The Sieve implementation will expect a mail message that implements a MailAdapter interface. The MailAdapter interface specifies the minimum functionality required to implement the Commands and Tests that RFC3028 says a Sieve implementation 'MUST' implement[1]. All of which will be implemented by this Sieve implementation. The adapter implementation wraps an application's mail message object, such as MimeMessage for JavaMail, MailImpl for James, or a super lightweight streaming object for Noel. The mail message object implements the required functionality in whatever way is most efficient for them. Applications can extend the MailAdapter interface to include the extra functionality their mail message objects support. This extra functionality is exercised by using Sieve's extension mechanism to add new Commands and Tests, specific to the application. RFC3028 mandates that a Sieve script must explicitly declare via the 'requires' Command any extension it will use. As this is evaluated at run time, it is easy to dynamically type-check in 'requires' that the MailAdapter instance is compatible with the method signature of the entity declared as required. Unless I've missed something, this gives a bullet-proof mechanism for supporting any mail messag object and extending the base Sieve functionality to support any number of application specific MailAdapters and their corresponding Commands and Tests without any changes to Sieve's base implementation. As usual, comments are hugely welcomed. Also, any further ideas on where/how I might dump this evolving code-base? I hope to have an alpha release by year end. -- Steve [1] 'MUST' Commands: if, else, elsif, require, stop, keep, discard, redirect 'MUST' Tests: address, allof, anyof, exists, false, header, not, size, true - - - - - - - - - - - - - - - - - - This private and confidential e-mail has been sent to you by Synergy Systems Limited. It may not represent the views of Synergy Systems Limited. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with "received in error" as the subject and then delete it from your mailbox. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]