org.apache.cocoon.stax.component
Class XMLSerializer

java.lang.Object
  extended by org.apache.cocoon.pipeline.component.AbstractPipelineComponent
      extended by org.apache.cocoon.stax.component.XMLSerializer
All Implemented Interfaces:
Consumer, Finisher, PipelineComponent, StAXConsumer, StAXPipelineComponent

public class XMLSerializer
extends AbstractPipelineComponent
implements StAXConsumer, Finisher

Standard implementation of the cocoon Finisher for StAX pipelines. This pipeline pushes all events through the pipeline and write them UTF-8 encoded to an XMLEventWriter created from an OutputStream inserted in the Finisher.setOutputStream(OutputStream).


Constructor Summary
XMLSerializer()
           
 
Method Summary
 String getContentType()
          
 void initiatePullProcessing()
          Since the workflow in a pull pipeline is completely inverted compared to for example a SAX pipeline, this method is required to push the Starter.execute() to the Finisher which should start processing.
 void setOutputStream(OutputStream outputStream)
          
 void setParent(StAXProducer parent)
          Used to connect a consumer to it's producer.
 
Methods inherited from class org.apache.cocoon.pipeline.component.AbstractPipelineComponent
finish, setConfiguration, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.pipeline.component.PipelineComponent
finish, setConfiguration, setup
 

Constructor Detail

XMLSerializer

public XMLSerializer()
Method Detail

setOutputStream

public void setOutputStream(OutputStream outputStream)

Specified by:
setOutputStream in interface Finisher
See Also:
Finisher.setOutputStream(java.io.OutputStream)

initiatePullProcessing

public void initiatePullProcessing()
Since the workflow in a pull pipeline is completely inverted compared to for example a SAX pipeline, this method is required to push the Starter.execute() to the Finisher which should start processing.

Specified by:
initiatePullProcessing in interface StAXConsumer
See Also:
StAXConsumer.initiatePullProcessing()

setParent

public void setParent(StAXProducer parent)
Used to connect a consumer to it's producer. As to the nature of the control inversion and pulling it is required to specify a parent, which provides the consumer with events to consume. This function is called when the pipeline sets it's consumers.

Specified by:
setParent in interface StAXConsumer
See Also:
StAXConsumer.setParent(org.apache.cocoon.stax.StAXProducer)

getContentType

public String getContentType()

Specified by:
getContentType in interface Finisher
See Also:
Finisher.getContentType()


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