org.openpipeline.pipeline.stage
Class DiskWriter

java.lang.Object
  extended by org.openpipeline.pipeline.stage.Stage
      extended by org.openpipeline.pipeline.stage.DiskWriter

public class DiskWriter
extends Stage

Writes items to disk in XML format. Each item is written to a file. The filename is the itemId with ".xml" appended.


Constructor Summary
DiskWriter()
           
 
Method Summary
 void close()
          Closes the stage and releases any resources.
 void flush()
          If this stage accumulates items or sends them down a channel, this method flushes them.
 String getConfigPage()
          Get the name of the .jsp page in the admin webapp that configures this stage.
 String getDescription()
          Returns a brief description of what this class does, for use in the admin app.
 String getDisplayName()
          Return the name of the Stage to display in the Admin UI, for example, "My Stage"
 void initialize()
          Perform any necessary initialization.
 void processItem(Item item)
          Perform some operation on an item.
 
Methods inherited from class org.openpipeline.pipeline.stage.Stage
addChildStage, childStagesAccepted, getChildStages, getNextStage, loadParamsFromXML, saveParamsToXML, setNextStage, setParams
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskWriter

public DiskWriter()
Method Detail

processItem

public void processItem(Item item)
                 throws PipelineException
Description copied from class: Stage
Perform some operation on an item. This is where the stage does its work.

Specified by:
processItem in class Stage
Parameters:
item - the item to process
Throws:
PipelineException - a recoverable exception caused by this stage. Unrecoverable errors should be thrown as unchecked exceptions

initialize

public void initialize()
Description copied from class: Stage
Perform any necessary initialization.

Overrides:
initialize in class Stage

flush

public void flush()
Description copied from class: Stage
If this stage accumulates items or sends them down a channel, this method flushes them.

Overrides:
flush in class Stage

close

public void close()
Description copied from class: Stage
Closes the stage and releases any resources. A stage may not be reopened/initialized.

Overrides:
close in class Stage

getDescription

public String getDescription()
Description copied from class: Stage
Returns a brief description of what this class does, for use in the admin app.

Specified by:
getDescription in class Stage

getDisplayName

public String getDisplayName()
Description copied from class: Stage
Return the name of the Stage to display in the Admin UI, for example, "My Stage"

Specified by:
getDisplayName in class Stage

getConfigPage

public String getConfigPage()
Description copied from class: Stage
Get the name of the .jsp page in the admin webapp that configures this stage.

Overrides:
getConfigPage in class Stage
Returns:
the file name of a page, for example, "stage_mystage.jsp", or null if no page necessary