From: Sergey B. <sbe...@za...> - 2003-10-14 08:57:03
|
> What is a preferred execution model for XComponents ? That was probably a silly question. I know that for XComponent to be executed it has to be inserted in XPipe, and XPipe engine will execute it. I'm just thinking about cooking up my own simple execution engine, if time allows. My thinking was that because XPipe is just a sequence/composite list of XComponents, then an execution engine can execute both XPipe and XComponent, the same way as JUnit TestRunner can execute TestSuite and TestCase. Any other Composite exampel will do as well. For this to work I'd probably add abstract class AbstractXComponent, with both XComponent and XPipe inheriting from it. Or may be, XRunnable interface with a method like run(InputStream, OutputStream) could be implemented by XPipe, XCompoment and even XRig. There's still a question where XComponent will get an execution environment from, perhaps it can obtain it from some Registry or Factory which would return a (cached) instance of XExecutor based on XComponent code configuration. The same applies to pre and post validators. All existing XComponent methods are fine, they're very useful for a building tool. It may not be a good idea, but this is just my first cut. By the way, what is XGrid ? Thanks Sergey Beryozkin |