org.apache.commons.pipeline.config
Class DigesterPipelineFactory

java.lang.Object
  extended by org.apache.commons.pipeline.config.DigesterPipelineFactory
All Implemented Interfaces:
PipelineFactory

public class DigesterPipelineFactory
extends Object
implements PipelineFactory

This factory is designed to simplify creating a pipeline using Digester.

See Also:
for additional information on the format of the XML configuration file.

Constructor Summary
DigesterPipelineFactory(URL confURL)
          A factory created by this constructor will create a pipeline from the specified XML configuration file.
 
Method Summary
 void addRuleSet(org.apache.commons.digester.RuleSet ruleSet)
          Adds a RuleSet to the list of rules available to Digester for parsing the configuration file.
 Pipeline createPipeline()
          Creates a new pipeline based upon the configuration of this factory instance.
 void initDigester(org.apache.commons.digester.Digester digester)
          Initialize a Digester instance with the rule sets provided to this factory.
static void main(String[] argv)
          The simplest possible main method that creates a pipeline from a configuration file, then runs the pipeline processing from start to finish.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DigesterPipelineFactory

public DigesterPipelineFactory(URL confURL)
A factory created by this constructor will create a pipeline from the specified XML configuration file.

Parameters:
configFile - the XML file containing pipeline configuration information
Method Detail

createPipeline

public Pipeline createPipeline()
                        throws PipelineCreationException
Creates a new pipeline based upon the configuration of this factory instance.

Specified by:
createPipeline in interface PipelineFactory
Returns:
The newly created pipeline instance
Throws:
PipelineCreationException - Thrown if an error is encountered parsing the configuration file.

initDigester

public void initDigester(org.apache.commons.digester.Digester digester)
Initialize a Digester instance with the rule sets provided to this factory.

Parameters:
digester - The digester instance to be initialized

addRuleSet

public void addRuleSet(org.apache.commons.digester.RuleSet ruleSet)
Adds a RuleSet to the list of rules available to Digester for parsing the configuration file.

Parameters:
ruleSet - The rule set to be added to the Digester

main

public static void main(String[] argv)
The simplest possible main method that creates a pipeline from a configuration file, then runs the pipeline processing from start to finish. When run from the command line, the only argument to this method should be the path to the configuration file.

Parameters:
argv - the command line arguments


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.