A pipeline expects one or more {@link PipelineComponent}s that passed by using {@link #addComponent(PipelineComponent)}. Then these components get linked with each other in the order they were added. The {@link #setup(OutputStream,Map)} method, calls the setup method on allpipeline components and assembles the pipeline. Finally the {@link #execute()} method produces the result and writes it to the{@link OutputStream} which has been passed to the{@link #setup(OutputStream,Map)} method.
A pipeline works based on two fundamental concepts:
When the pipeline links the components, it merely checks whether the above mentioned interfaces are present. So the pipeline does not know about the specific capabilities or the compatibility of the components. It is the responsibility of the {@link Producer} to decide whether a specific{@link Consumer} can be linked to it or not (that is, whether it can produceoutput in the desired format of the {@link Consumer} or not). It is alsoconceivable that a {@link Producer} is capable of accepting different typesof {@link Consumer}s and adjust the output format according to the actual {@link Consumer}.
|
|
|
|
|
|
|
|
|
|
|
|