commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <craig...@gmail.com>
Subject Re: [chain] fixed, one-way chains, only?
Date Tue, 15 Mar 2005 21:04:29 GMT
On Tue, 15 Mar 2005 21:54:29 +0100, tmp@nitwit.de <tmp@nitwit.de> wrote:
> It does perfectly match my requirement. The only problem it that the chain is
> fixed hierarchical and does not implement any logic which element to be the
> next to be able to handle the object properly.
> 
> So, it's
> 
>         A -> B -> C
> 
> rather than
> 
>    +- B
>    |
> A -+ (logic)
>    |
>    +- C
> 

Building a Command implementation that says "execute command B if
condition X is true, or command C otherwise" is trivially simple to
write.  It isn't really amenable to a generic implementation, however,
because the conditional test is application specific (as is the number
of potential branches).

Not also that either B or C can actually be a chain itself, because a
Chain is-a Command.

Craig

> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message