org.apache.cocoon.pipeline
Class AbstractPipeline

java.lang.Object
  extended by org.apache.cocoon.pipeline.AbstractPipeline
All Implemented Interfaces:
Pipeline
Direct Known Subclasses:
CachingPipeline, NonCachingPipeline

public abstract class AbstractPipeline
extends Object
implements Pipeline

Basic pipeline implementation that collects the PipelineComponents and connects them with each other.


Constructor Summary
AbstractPipeline()
           
 
Method Summary
 void addComponent(PipelineComponent pipelineComponent)
          Add a PipelineComponent to the pipeline.
 void execute()
          After the pipeline has been setup (Pipeline.setup(OutputStream, Map), this method can be invoked in order to produce the result.
protected  LinkedList<PipelineComponent> getComponents()
           
 String getContentType()
          Get the mime-type http://tools.ietf.org/html/rfc2046 of the content produced by the pipeline.
protected  Finisher getFinisher()
           
 long getLastModified()
          Get the time of the last modification.
protected  void invokeStarter()
           
 void setup(OutputStream outputStream)
          After the pipeline has been prepared (Pipeline.addComponent(PipelineComponent), this method can be invoked in order to setup and initialize the pipeline and its components.
 void setup(OutputStream outputStream, Map<String,Object> parameters)
          The same as Pipeline.setup(OutputStream) but also allows passing parameters to the pipeline components.
protected  void setupComponents(OutputStream outputStream, Map<String,Object> parameters)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractPipeline

public AbstractPipeline()
Method Detail

addComponent

public void addComponent(PipelineComponent pipelineComponent)
Add a PipelineComponent to the pipeline. The order of when the components are passed is significant.

Specified by:
addComponent in interface Pipeline
Parameters:
pipelineComponent - The PipelineComponent.
See Also:
Pipeline.addComponent(org.apache.cocoon.pipeline.component.PipelineComponent)

setup

public void setup(OutputStream outputStream)
After the pipeline has been prepared (Pipeline.addComponent(PipelineComponent), this method can be invoked in order to setup and initialize the pipeline and its components.

Specified by:
setup in interface Pipeline
Parameters:
outputStream - An OutputStream where the pipeline execution result is written.
See Also:
Pipeline.setup(java.io.OutputStream, java.util.Map)

setup

public void setup(OutputStream outputStream,
                  Map<String,Object> parameters)
The same as Pipeline.setup(OutputStream) but also allows passing parameters to the pipeline components.

Specified by:
setup in interface Pipeline
Parameters:
outputStream - An OutputStream where the pipeline execution result is written.
parameters - A Map of parameters that are available to all PipelineComponents.
See Also:
Pipeline.setup(java.io.OutputStream, java.util.Map)

execute

public void execute()
             throws Exception
After the pipeline has been setup (Pipeline.setup(OutputStream, Map), this method can be invoked in order to produce the result.

Specified by:
execute in interface Pipeline
Throws:
Exception - Any problem that might occur while processing the pipeline.
See Also:
Pipeline.execute()

getContentType

public String getContentType()
Get the mime-type http://tools.ietf.org/html/rfc2046 of the content produced by the pipeline.

Specified by:
getContentType in interface Pipeline
Returns:
The mime-type of the content.
See Also:
Pipeline.getContentType()

getComponents

protected LinkedList<PipelineComponent> getComponents()

getFinisher

protected Finisher getFinisher()

invokeStarter

protected void invokeStarter()

setupComponents

protected void setupComponents(OutputStream outputStream,
                               Map<String,Object> parameters)

getLastModified

public long getLastModified()
Description copied from interface: Pipeline
Get the time of the last modification.

Specified by:
getLastModified in interface Pipeline
Returns:
The last modification date

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 The Apache Software Foundation. All Rights Reserved.