Federico Barbieri wrote:
> > No, you can't if you close up "new Mail()" and all the other
> > constructions by making them not accessible from the mailet.
> >
>
> But mailet should be able to create new Mail object... we must prevent
> new Mail to be returned in the pipe.
>
> So what is the Mail service(Mail) useful for if the only Mail I can
> return is the one I gave you?
> IMNSHO this is misleading for programmers. You open a door and then say
> "But you cannot use it!".
> It's much more linear to give full access to new Mail() and close the
> return door.
Good point.
Let's try again:
Mailet
void init(MailContext context);
void service(Mail mail) throws MailetException;
MailContext
void sendMail(Mail mail) throws IOException;
Serge wanted the Mailet to return a boolean to indicate if the mail
should be further processed or not. I think this violates the principle
of mailet componentization and should be avoided. Each mail must not be
able to influence what happens "outside" itself.
I believe the above API resolves all our concerns.
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<[EMAIL PROTECTED]> Friedrich Nietzsche
--------------------------------------------------------------------
Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/>
Problems?: [EMAIL PROTECTED]