cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Pötz <reinh...@apache.org>
Subject Re: [C3] Pipeline component event types
Date Tue, 13 Jan 2009 14:08:33 GMT
Grzegorz Kossakowski wrote:
> Grzegorz Kossakowski wrote:
>> Reinhard Pötz wrote:
>>   
>>> I don't believe that pipelines should contain components that support
>>> different event types or that we event need components that have
>>> different input and output events.
>>>   
>>>     
>> What about serializer? Usually, it produces events of a type different
>> from the type of events it consumes.
>>   
>>> If you want to mix your components (e.g. using a SAX component in a
>>> pipeline full of StAX components), you should put your 'alien' component
>>> into a wrapper.
>>>   
>>>     
>> Agreed. How do you know what kind of wrapper do you need if you don't
>> know what kind of events components consume and produce?

My assumption is that the developer that uses the pipeline knows what he
does.

>> How component can be sure that next component (its consumer) is the one
>> that accepts right type of events? By checking using instanceof?
>> My point is that once we agree to have generic pipelines that can take
>> components accepting/producing any kind of events then we need to invent
>> some mechanism that check if pipeline is built correctly. It shouldn't
>> be a concern of a given component.
>>
>> If we agree on above point, then my suggestion would be to look for a
>> way that pipeline-correctness is ensured by compiler.

I don't see any way to express this kind of check with Java and AFAICS
your experiments haven't been successful either.

> One more thing:
> The idea that pipeline does know about event types that components
> process solves the problem with pipeline results as you have different
> event type carrying different data.

-- 
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                         http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  reinhard@apache.org
________________________________________________________________________

Mime
View raw message