Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cocoon.stax.component
Class XMLSerializer

    java.lang.Object
      org.apache.cocoon.pipeline.component.AbstractPipelineComponent
          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`

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()`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright � 2008-2010 The Apache Software Foundation. All Rights Reserved.