Class BranchPointValve

java.lang.Object
com.easydesk.pipeline.BranchPointValve
All Implemented Interfaces:
Valve
Direct Known Subclasses:
ConditionalValve

public abstract class BranchPointValve extends Object implements Valve
A Valve description of a pipeline's branch point. It may itself be the start of zero or more Pipeline paths, and can even continue executing the pipeline that the branch point resides on after its branch pipelines finish.
Version:
$Id: BranchPointValve.java,v 1.1 2007/12/04 01:24:32 youngho Exp $
Author:
Daniel Rall
  • Field Details

  • Constructor Details

    • BranchPointValve

      public BranchPointValve()
  • Method Details

    • addPipeline

      public void addPipeline(Pipeline pipeline) throws Exception
      Parameters:
      pipeline -
      Throws:
      Exception
    • getPipelines

      public Pipeline[] getPipelines()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • invoke

      public abstract void invoke(PipelineData pipelineData, ValveContext context) throws IOException, PipelineException

      Selects which pipeline path to branch down. This may just consist of calling context.invokeNext(data) to continue down the current pipeline's path. The desired branch path is generally determined using data pulled from the suppliedRunData.

      Here's an illustration of inserting a BranchPointValve into the TurbinePipeline processing sequence:

                                               ___ (start of FooPipeline)--
      
       ---[Valve]--[Valve]--[BranchPointValve]                              ---- (continue w/ Pipeline)
                                              \                            /
                                               --- (start of BarPipeline)--
       
      The BranchPointValve could just as easily stop all processing by neither invoking a new pipeline nor calling invokeNext().

      Specified by:
      invoke in interface Valve
      Parameters:
      pipelineData - The run-time data.
      context - The run-time data.
      Throws:
      IOException - Problem choosing pipeline to branch down.
      PipelineException - Problem choosing pipeline to branch down.
      See Also: