Class Stages.StageChainBuilder<DATA>
java.lang.Object
org.glassfish.jersey.process.internal.Stages.StageChainBuilder<DATA>
- All Implemented Interfaces:
Stage.Builder<DATA>
- Enclosing class:
Stages
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
StageChainBuilder
(Function<DATA, DATA> transformation) private
StageChainBuilder
(ChainableStage<DATA> rootStage) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addTailStage
(Stage<DATA> lastStage) build()
Build a stage chain.Add a terminal stage to the stage chain and build the chain.convertTransformations
(Stage<DATA> successor) Add a transformation function as a next stage to the stage chain.to
(ChainableStage<DATA> stage) Add a newchainable stage
as a next stage to the stage chain.
-
Field Details
-
transformations
-
rootStage
-
lastStage
-
-
Constructor Details
-
StageChainBuilder
-
StageChainBuilder
-
-
Method Details
-
to
Description copied from interface:Stage.Builder
Add a transformation function as a next stage to the stage chain.The order of the
to(...)
method invocations matches the order of the stage execution at runtime.- Specified by:
to
in interfaceStage.Builder<DATA>
- Parameters:
transformation
- a transformation function to be added as a next stage to the stage chain.- Returns:
- updated builder instance.
-
to
Description copied from interface:Stage.Builder
Add a newchainable stage
as a next stage to the stage chain.The order of the
to(...)
method invocations matches the order of the stage execution at runtime. A subsequent call to ato(...)
method will automatically invoke theChainableStage.setDefaultNext(Stage)
method on the chainable stage.- Specified by:
to
in interfaceStage.Builder<DATA>
- Parameters:
stage
- a chainable stage to be added as a next stage to the stage chain.- Returns:
- updated builder instance.
-
addTailStage
-
build
Description copied from interface:Stage.Builder
Add a terminal stage to the stage chain and build the chain.- Specified by:
build
in interfaceStage.Builder<DATA>
- Parameters:
stage
- last stage to be added to the stage chain.- Returns:
- built stage chain.
-
build
Description copied from interface:Stage.Builder
Build a stage chain.- Specified by:
build
in interfaceStage.Builder<DATA>
- Returns:
- built acceptor chain.
-
convertTransformations
-