On Apr 19, 2013, at 10:28 AM, Stephen J. Turnbull wrote: >Barry Warsaw writes: > > > I still think this wouldn't be a handler, but a rule. > >Is this distinction implemented and enforced by the API?
It is. There are two distinct interfaces, IHandler and IRule, with different signatures. It's also enforced by design and implementation, since rules are generally attached to actions via links in a chain and get executed during incoming processing, whereas handlers are processed sequentially without interruption, and only after the message has been accepted for posting. >If not, it's going to be hard to persuade myself to make the distinction in >discussion. Ie, I'll probably just go on calling everything a Handler unless >somebody asks "don't you really mean a Rule?" There are several ways to think about it, but I guess the easiest one is "does this chunk of processing change the message or make a non-destructive moderation decision?" Or more simply, "is it moderation or modification?" If it's moderation, then it's a rule. If it's modification then it's a handler. (There are some corner cases in each, but it's a good general distinction.) Thus a chunk that asks "does this message contain administrivia?" is a moderation question and thus a rule. A chunk that adds an informative footer to the message is a modification handler. Aside: I wanted to find a better name than "handler" for the modification bits, but I failed. I would have rather done away with the term "handler" in MM3 so suggestions are welcome for the term naming the units that plug into the modification pipeline. The interfaces are important too because MM3 initialization will auto-discover both rules and handlers and stick them in different collections. If we ever expose this in the REST API, then you would be able to compose them in different ways, appropriate for the interface. Hope that helps. -Barry
signature.asc
Description: PGP signature
_______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9