Class Stages.StageChainBuilder<DATA>

java.lang.Object
org.glassfish.jersey.process.internal.Stages.StageChainBuilder<DATA>
All Implemented Interfaces:
Stage.Builder<DATA>
Enclosing class:
Stages

private static class Stages.StageChainBuilder<DATA> extends Object implements Stage.Builder<DATA>
  • Field Details

  • Constructor Details

  • Method Details

    • to

      public Stage.Builder<DATA> to(Function<DATA,DATA> transformation)
      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 interface Stage.Builder<DATA>
      Parameters:
      transformation - a transformation function to be added as a next stage to the stage chain.
      Returns:
      updated builder instance.
    • to

      public Stage.Builder<DATA> to(ChainableStage<DATA> stage)
      Description copied from interface: Stage.Builder
      Add a new chainable 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 a to(...) method will automatically invoke the ChainableStage.setDefaultNext(Stage) method on the chainable stage.

      Specified by:
      to in interface Stage.Builder<DATA>
      Parameters:
      stage - a chainable stage to be added as a next stage to the stage chain.
      Returns:
      updated builder instance.
    • addTailStage

      private void addTailStage(Stage<DATA> lastStage)
    • build

      public Stage<DATA> build(Stage<DATA> stage)
      Description copied from interface: Stage.Builder
      Add a terminal stage to the stage chain and build the chain.
      Specified by:
      build in interface Stage.Builder<DATA>
      Parameters:
      stage - last stage to be added to the stage chain.
      Returns:
      built stage chain.
    • build

      public Stage<DATA> build()
      Description copied from interface: Stage.Builder
      Build a stage chain.
      Specified by:
      build in interface Stage.Builder<DATA>
      Returns:
      built acceptor chain.
    • convertTransformations

      private Stage<DATA> convertTransformations(Stage<DATA> successor)