Class Pipeline<T>
java.lang.Object
com.norconex.commons.lang.pipeline.Pipeline<T>
- Type Parameters:
T- pipeline context type
- All Implemented Interfaces:
IPipelineStage<T>,Predicate<T>
Deprecated.
Represent a very simple pipeline container for a list of executable tasks
called "pipeline stages" (defined using
Predicate).
This pipeline class can also be used as a pipeline stage to create
pipe hierarchies.
Any of the pipeline stages returning false effectively
puts an end to the pipeline execution.
For more sophisticated workflow needs, consider using a more advanced
framework.- Since:
- 1.5.0
-
Constructor Summary
ConstructorsConstructorDescriptionPipeline()Deprecated.Constructor.Pipeline(List<IPipelineStage<T>> stages) Deprecated.Creates a new pipeline with the specified stages. -
Method Summary
Modifier and TypeMethodDescriptionaddStage(IPipelineStage<T> stage) Deprecated.Adds a stage to the pipeline.addStages(List<IPipelineStage<T>> stages) Deprecated.Adds stages to the pipeline.voidDeprecated.booleanDeprecated.Executes this pipeline stage.Deprecated.Gets the pipeline stages.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.norconex.commons.lang.pipeline.IPipelineStage
test
-
Constructor Details
-
Pipeline
public Pipeline()Deprecated.Constructor. -
Pipeline
Deprecated.Creates a new pipeline with the specified stages.- Parameters:
stages- the stages to execute
-
-
Method Details
-
getStages
Deprecated.Gets the pipeline stages.- Returns:
- the pipeline stages
-
addStages
Deprecated.Adds stages to the pipeline.- Parameters:
stages- pipeline stages to add- Returns:
- this instance, for chaining
-
addStage
Deprecated.Adds a stage to the pipeline.- Parameters:
stage- pipeline stage to add- Returns:
- this instance, for chaining
-
clearStages
public void clearStages()Deprecated. -
execute
Deprecated.Description copied from interface:IPipelineStageExecutes this pipeline stage. Implementors are encouraged to throwPipelineExceptionupon errors.- Specified by:
executein interfaceIPipelineStage<T>- Parameters:
context- pipeline context- Returns:
- whether to continue pipeline execution or stop (
trueto continue).
-
PredicatesorPredicatechaining instead