> From: Magesh Umasankar [mailto:[EMAIL PROTECTED] > Hi, > > I'd like to introduce the concept of a DispatchTask to Ant. This class > may > be subclassed by tasks that perform multiple operations depending upon a > parameter. Currently, the task-writer would be using if...else if...else > constructs. Extending from this class would make it more elegant. Use > cases include tasks that take in same set of parameters but perform > different operations based on needs. > > Example usage would be: > > <somecompoundtask param1="..." param2="..." mode="list"/> > > In the above example, the custom task writer extends from DispatchTask > instead of Task and implements a method with the signature: > public void list() throws BuildException
Hi Magesh. It's been a long time ;-) What's the advantage of this other writing different tasks, possibly with the usual Java code re-use? Especially if different modes require different params. I've written at least one task with an action attribute and then do the dispatch based on it, but I don't think this should be made into a framework. What's your more specific use case? --DD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]