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? > > 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. > 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.
-- Best regards, Grzegorz Kossakowski
