Package com.easydesk.pipeline
Class BranchPointValve
java.lang.Object
com.easydesk.pipeline.BranchPointValve
- All Implemented Interfaces:
Valve
- Direct Known Subclasses:
ConditionalValve
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 Summary
FieldsModifier and TypeFieldDescriptionprotected CopyOnWriteArrayList<Pipeline> The set of Valves associated with this Pipeline. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPipeline(Pipeline pipeline) Pipeline[]DOCUMENT ME!abstract voidinvoke(PipelineData pipelineData, ValveContext context) Selects which pipeline path to branch down.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.easydesk.pipeline.Valve
getPipeline, getValue, initialize, setPipeline, setValue
-
Field Details
-
pipelines
The set of Valves associated with this Pipeline.
-
-
Constructor Details
-
BranchPointValve
public BranchPointValve()
-
-
Method Details
-
addPipeline
- Parameters:
pipeline-- Throws:
Exception
-
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
BranchPointValveinto theTurbinePipelineprocessing sequence:
The___ (start of FooPipeline)-- ---[Valve]--[Valve]--[BranchPointValve] ---- (continue w/ Pipeline) \ / --- (start of BarPipeline)--BranchPointValvecould just as easily stop all processing by neither invoking a new pipeline nor callinginvokeNext().- Specified by:
invokein interfaceValve- 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:
-