I would start by saying that you can make the case for DispatchChain more than you can for DispatchCommand or LookupDispatchCommand both of which are now in there.
Joe should probably weigh in on this because of his initial contribution of DispatchCommand. I added LookupDispatchCommand to round things out but I'm not totally convinced its necessary anymore (I thought I would need it for DispatchChain.) Now some additional defense about my beloved DispatchChain... Its not for everyone, true, but neither is LookupCommand and stuff like that. That's why I feel it should belong in the 'generic' package. Its a useful tool that is general enough that others may want to use it. Also, DispatchChain still implements the Command interface. It has only a single execute method. It can be used with ChainBase, LookupCommand, or any of the other combinations of Commands you can think of. You do not use a dispatch method to call DispatchChain, you just provide the chain with a dispatch method to call on its own commands. This is still in keeping with the composite nature of the chain. When you lookup a regular chain in a catalog and call execute, you don't have to worry yourself about whether something is a chain or a regular command, just that it implements the command interface. Same thing here. Its just that now this variant of chain will call a different method on its commands. Its still in keeping with the COR pattern. A single method (and the same method) is called by every command in the chain. Any one of those commands can terminate execution if it feels the request has been satisfied. Just think of it as a chain within a chain. sean On Fri, 14 Jan 2005 09:20:56 -0800, Craig McClanahan <[EMAIL PROTECTED]> wrote: > I plead guilty to being lukewarm (is lukecold a word? :-) about > DispatchChain and friends being part of the standard chain package -- > I'd like to spend some time tomorrow (Saturday) looking at the code > and seeing if I buy in to Sean's use cases. > > Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
