If some errors occur in a responsibility, it means the raw message is invalid, the responsibility can return null protocol object and the outmost control flow just discards it. It seems like the topic owner tried to approach this message parsing step by state pattern, but I think it should be chain of res. instead.
In addition, in case that each protocols are quite different to parse, it might need to introduce some strategy patterns into the model. -thanks kem On 10/4/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > What about the builder with partial build information (or the startgey that > owns the builder) if there is an error between the chains of responsibilty > and returns immediatly. > Curious to know.. > Regards > Deena > > -------------- Original message -------------- > > > aYeah, I've just come up with an idea to use chain of responsibility > > together with builder. The first responsibility is to parse header, > > extract message length and protocol information, and insert these > > information into a builder, then cll the second responsibility to > > parse body, add it to the builder and so on.. in each responsibility, > > if it detects error, it won't call the next responsibility, but return > > immediately. The last responsibility will generate protocol object > > from the builder. > > > > -thanks > > kem. > > _______________________________________________ patterns-discussion mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/patterns-discussion
