Package com.easydesk.pipeline
Class ConditionalValve
java.lang.Object
com.easydesk.pipeline.BranchPointValve
com.easydesk.pipeline.ConditionalValve
- All Implemented Interfaces:
Valve
- Direct Known Subclasses:
DependTypeMatchingConditionValve,ModuleCategoryConditionValve,ModuleMatchingConditionValve
DOCUMENT ME!
- Version:
- $id: ConditionalValve.java $Revision$, 12-18-21 9:27:43 PM KST
- Author:
- YounghoCho
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringPipeline Name which Condition matching value for pileline selectFields inherited from class com.easydesk.pipeline.BranchPointValve
pipelines -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the provided valve to the contained pipeline.DOCUMENT ME!getValue()DOCUMENT ME!voidInitializes all sub-pipelines.voidinvoke(PipelineData pipelineData, ValveContext context) Selects which pipeline path to branch down.protected abstract Pipelineselect(PipelineData pipelineData) Determine whether the contained valves should be run.voidsetPipeline(String pdp) DOCUMENT ME!voidThe value for the associatedWriterto write.Methods inherited from class com.easydesk.pipeline.BranchPointValve
addPipeline, getPipelines
-
Field Details
-
value
Pipeline Name which Condition matching value for pileline select
-
-
Constructor Details
-
ConditionalValve
public ConditionalValve()
-
-
Method Details
-
setPipeline
DOCUMENT ME!- Parameters:
pdp- DOCUMENT ME!
-
getPipeline
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
setValue
The value for the associatedWriterto write.- Parameters:
value- DOCUMENT ME!- See Also:
-
getValue
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
initialize
Initializes all sub-pipelines.- Throws:
Exception- if initialization fails- See Also:
-
addValve
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:BranchPointValveSelects 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- Specified by:
invokein classBranchPointValve- 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
Determine whether the contained valves should be run. Subclasses should implement this method.- Parameters:
pipelineData-- Returns:
- pipeline or null
-