I've posted a less focused form of this question before. Based on the responses I got a lot of ideas which opened up things to new and hopefully more refined questions.
To recap. I'm trying to determine the most appropriate design pattern(s) to implement a solution to the following problems. 1. When applicable, determine filter chaining configuration based on some message content. Where possible determine filter chaining based on a set of business rules. 2 .Define a set of specific xml message processors for requests for both document inputs and outputs. 3. The processors support a common message I/O interface that can allow processor chaining. 4. To chain message processors in a flexible/configurable way. 5. Some processing chains result in a final submission to another processor that doesn't easily support the interface defined in 3. Some do not. Based on the suggestions a think some form of Content based router along with an Interception Filter pattern is pretty close to a fit. See Figure 7.1 represents the Intercepting Filter http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter. html Questions/implementation Confusions: 1. Does the message processed through the chain always have to be forwarded to a "Target" in these patterns or can the final process just be a converted message that's returned to the caller without a Target? 2. Does the Decorator around a front controller variation have advantages/disadvsantages over the filter chain variation? The filterChain looks more easily configurable from an xml file i.e. deployment descriptor file. See link below. 3. Should the client always be responsible for supplying the processing context within a request or is it O.K. to apply this on a request by request basis. Does this fit? e.g. For input requests: When looking at your input data message I see that you're customer type "A" so I'll process your message through filters A & C then send the transformed message to a target to complete message processing. For output requests: When I'm looking at your request for data message I look up in my data tables and I see that you'r customer type "B" so I'll retrieve your data process you data message through filters A & C and just return the document back to you. =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
