| org.apache.cocoon.components.pipeline.ProcessingPipeline
All known Subclasses: org.apache.cocoon.components.pipeline.AbstractProcessingPipeline,
ProcessingPipeline | public interface ProcessingPipeline extends Component,Recomposable(Code) | | A ProcessingPipeline produces the response for a given request.
It is assembled according to the commands in the sitemap and can either
- Collect a
Reader and let it produce a byte stream,
- Or connect a
Generator with zero or more
Transformer s and a Serializer , and let them
produce the byte stream. This pipeline uses SAX events for
communication.
A ProcessingPipeline is Recomposable since the
ComponentManager used to get the generator, transformers, etc.
depends on the pipeline assembly engine where they are defined (i.e. a given
sitemap file).
author: Carsten Ziegeler author: Giacomo Pati version: $Id: ProcessingPipeline.java 433543 2006-08-22 06:22:54Z crossley $ |
Method Summary | |
void | addTransformer(String role, String source, Parameters param, Parameters hintParam) Add a transformer at the end of the pipeline.
The transformer role is given : the actual Transformer is fetched
from the latest ComponentManager given by compose()
or recompose() .
Parameters: role - the transformer role in the component manager. Parameters: source - the source used to setup the transformer (e.g. | Generator | getGenerator() | String | getKeyForEventPipeline() Return the key for the event pipeline
If the "event pipeline" (= the complete pipeline without the
serializer) is cacheable and valid, return a key. | SourceValidity | getValidityForEventPipeline() Return valid validity objects for the event pipeline
If the "event pipeline" (= the complete pipeline without the
serializer) is cacheable and valid, return all validity objects. | void | informBranchPoint() | void | prepareInternal(Environment environment) | boolean | process(Environment environment) Process the given Environment , producing the output. | boolean | process(Environment environment, XMLConsumer consumer) Process the given Environment , but do not use the
serializer. | void | release() Release this component. | void | setErrorHandler(SitemapErrorHandler errorHandler) Sets error handler for this pipeline. | void | setGenerator(String role, String source, Parameters param, Parameters hintParam) Set the generator that will be used as the initial step in the pipeline. | void | setReader(String role, String source, Parameters param, String mimeType) | void | setSerializer(String role, String source, Parameters param, Parameters hintParam, String mimeType) | void | setup(Parameters params) Setup this component. |
addTransformer | void addTransformer(String role, String source, Parameters param, Parameters hintParam) throws ProcessingException(Code) | | Add a transformer at the end of the pipeline.
The transformer role is given : the actual Transformer is fetched
from the latest ComponentManager given by compose()
or recompose() .
Parameters: role - the transformer role in the component manager. Parameters: source - the source used to setup the transformer (e.g. XSL file), ornull if no source is given. Parameters: param - the parameters for the transfomer. throws: ProcessingException - if the generator couldn't be obtained. |
getGenerator | Generator getGenerator()(Code) | | Get the generator - used for content aggregation
|
getKeyForEventPipeline | String getKeyForEventPipeline()(Code) | | Return the key for the event pipeline
If the "event pipeline" (= the complete pipeline without the
serializer) is cacheable and valid, return a key.
Otherwise return null
|
getValidityForEventPipeline | SourceValidity getValidityForEventPipeline()(Code) | | Return valid validity objects for the event pipeline
If the "event pipeline" (= the complete pipeline without the
serializer) is cacheable and valid, return all validity objects.
Otherwise return null
|
informBranchPoint | void informBranchPoint()(Code) | | Informs pipeline we have come across a branch point
|
release | void release()(Code) | | Release this component.
If you get an instance not by a component manager but for example
by a processor, you have to release this component by calling
this method and NOT by using a component manager!
|
setGenerator | void setGenerator(String role, String source, Parameters param, Parameters hintParam) throws ProcessingException(Code) | | Set the generator that will be used as the initial step in the pipeline.
The generator role is given : the actual Generator is fetched
from the latest ComponentManager given by compose()
or recompose() .
Parameters: role - the generator role in the component manager. Parameters: source - the source where to produce XML from, or null if nosource is given. Parameters: param - the parameters for the generator. throws: ProcessingException - if the generator couldn't be obtained. |
setSerializer | void setSerializer(String role, String source, Parameters param, Parameters hintParam, String mimeType) throws ProcessingException(Code) | | Set the serializer for this pipeline
Parameters: mimeType - Can be null |
setup | void setup(Parameters params)(Code) | | Setup this component.
|
|
|