Class ConditionalValve

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

public abstract class ConditionalValve extends BranchPointValve
DOCUMENT ME!
Version:
$id: ConditionalValve.java $Revision$, 12-18-21 9:27:43 PM KST
Author:
YounghoCho
  • Field Details

    • value

      protected String value
      Pipeline Name which Condition matching value for pileline select
  • Constructor Details

    • ConditionalValve

      public ConditionalValve()
  • Method Details

    • setPipeline

      public void setPipeline(String pdp)
      DOCUMENT ME!
      Parameters:
      pdp - DOCUMENT ME!
    • getPipeline

      public String getPipeline()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • setValue

      public void setValue(String value)
      The value for the associated Writer to write.
      Parameters:
      value - DOCUMENT ME!
      See Also:
    • getValue

      public String getValue()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • initialize

      public void initialize() throws Exception
      Initializes all sub-pipelines.
      Throws:
      Exception - if initialization fails
      See Also:
    • addValve

      public void addValve(Valve valve)
      Adds the provided valve to the contained pipeline.
      Parameters:
      valve -
    • invoke

      public void invoke(PipelineData pipelineData, ValveContext context) throws IOException, PipelineException
      Description copied from class: BranchPointValve

      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
      Specified by:
      invoke in class BranchPointValve
      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:
    • select

      protected abstract Pipeline select(PipelineData pipelineData)
      Determine whether the contained valves should be run. Subclasses should implement this method.
      Parameters:
      pipelineData -
      Returns:
      pipeline or null