cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <scher...@gmail.com>
Subject Reuse of pipelines in java
Date Fri, 12 Aug 2011 19:08:38 GMT
Hi all,

I am migrating a StAX development from a customer to c3 StAX, since the
resulting code will be much more generic and understandable.

In my case I need to process all files from different folders, parse
them and invoke a second pipeline from the main pipe.

Meaning I have one principal pipeline which I need to repeat x times. 
I started to create the pipeline and it works very nice, however I
encounter some downsides with reusing the pipe. 

I found that you can execute a java based pipe exactly one time. There
is no such method to reset the pipe. My plan was to inject the pipeline
in my main code and then configure it on the Fly (reusing the same pipe
on different files).

Further there is as well no way to dynamically change the different
components once added to the pipe.

I mean 

Pipeline<StAXPipelineComponent> pipeStAX = new
NonCachingPipeline<StAXPipelineComponent>();
pipeStAX.addComponent(new XMLGenerator(input));
...
pipeStAX.setup(System.out);
pipeStAX.execute();

Now my question is how people feel about:
a) Making java based pipes resettable pipeStAX.reset()
b) Adding a method like pipeStAX.getComonponet(int i) to retrieve the
component x in position i. 

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
codeBusters S.L. - web based systems
<consulting, training and solutions>
http://www.codebusters.es/


Mime
View raw message