Re: [c3] Pipeline results
Reinhard Pötz <reinhard <at> apache.org>
2009-01-04 13:12:03 GMT
Carsten Ziegeler wrote:
> Reinhard Pötz wrote:
>> Reinhard Pötz wrote:
>>> Carsten Ziegeler wrote:
>>>
>>>> There is a slight overlap between the serializer and the result - for
>>>> example if you want to get java objects out of the pipeline, you might
>>>> want to use a special serializer. So maybe we can merge the two?
>>> I was thinking about this too but I preferred the symmetry of defining
>>> the input and output objects at pipeline level and not at component
>>> level. OTOH it's only the serializer which needs access to the output
>>> object, hmmm ...
>>>
>> The more I think about it the less I like the idea of merging the result
>> and the finisher (serializer) interfaces. The reason is that you would
>> have to pass the result object to the finisher which means that you have
>> to do this when you create the finisher instead of doing it when you
>> setup the pipeline.
> Hmm, if you merge result and finisher, you don't have to pass the result
> object to the finisher - it is the finisher :) But I guess you mean
> something like the output stream, right? (which is currently passed to
> the finisher by the pipeline object).
yes, I meant it that way.
> But I see your point - however I fear this flexibility - I guess it is
> unlikely that each finisher will cope with each possible result - text
> based finisher (like html or xml serializers) will be able to write to a
> stream or writer, finishers creating binary content (like the pdf
> serializer) will be able to write to a stream but not to a writer. Atm,
(Continue reading)