1) Why should it contains create/start/stop/destroy and not the configuration method?? if you think that configuration is made by injection with no specific interface then why can't the start/stop/create/destroy method be called in the same way?

2) I think we have to add something better for the routing than Mail service(Mail mail). We need a way to split a message into multiple parts and let the container know this happened, we need a way to bounce a message and let the container this happened, to forward to a different address and let the container know this, to expand it to multiple recipient and again let it know to dad.

I don't see anything better than the current mailet apis in this interface, sorry.

Stefano

Andrew C. Oliver wrote:
package org.apache.mailet;

public interface Mailet {

   void create();
   void start();
   void stop();
   void destroy();

   Mail service(Mail mail);
}


Main changes I'd like to avoid this holdover from Avalon "Configurable" and
make configuration a matter of injection (so all MailetConfig is removed).
I don't really see the need for the four stage lifecycle but this is basic CS stuff. I'm happy to remove create/destroy if there is consensus.

Generally I think Mailets will form chains. It strikes me as a better model to not assume that the mail object going in is the one that is ultimately delivered to the next mailet in the chain.

Thoughts?

-Andy




Reply via email to