T
- pipeline context typepublic class Pipeline<T> extends Object implements IPipelineStage<T>
IPipelineStage
).
This pipeline class can also be used a pipeline stage to create
pipe hierarchies.
For more sophisticated work flow needs, consider using a more advanced
framework such as Norconex JEF.Constructor and Description |
---|
Pipeline()
Constructor.
|
Pipeline(List<IPipelineStage<T>> stages)
Creates a new pipeline with the specified stages.
|
Modifier and Type | Method and Description |
---|---|
Pipeline<T> |
addStage(IPipelineStage<T> stage)
Adds a stage to the pipeline.
|
Pipeline<T> |
addStages(List<IPipelineStage<T>> stages)
Adds stages to the pipeline.
|
void |
clearStages() |
boolean |
execute(T context)
Executes this pipeline stage.
|
List<IPipelineStage<T>> |
getStages()
Gets the pipeline stages.
|
public Pipeline()
public Pipeline(List<IPipelineStage<T>> stages)
stages
- the stages to executepublic List<IPipelineStage<T>> getStages()
public Pipeline<T> addStages(List<IPipelineStage<T>> stages)
stages
- pipeline stages to addpublic Pipeline<T> addStage(IPipelineStage<T> stage)
stage
- pipeline stage to addpublic void clearStages()
public boolean execute(T context)
IPipelineStage
PipelineException
upon errors.execute
in interface IPipelineStage<T>
context
- pipeline contexttrue
to continue).Copyright © 2008–2021 Norconex Inc.. All rights reserved.