Class CompositeStage<T>

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.metadata.pipeline.AbstractStage<T>
net.shibboleth.metadata.pipeline.CompositeStage<T>
Type Parameters:
T - type of metadata this stage, and its composed stages, operate upon
All Implemented Interfaces:
Pipeline<T>, Stage<T>, net.shibboleth.shared.component.Component, net.shibboleth.shared.component.DestructableComponent, net.shibboleth.shared.component.IdentifiableComponent, net.shibboleth.shared.component.IdentifiedComponent, net.shibboleth.shared.component.InitializableComponent
Direct Known Subclasses:
SimplePipeline

@ThreadSafe public class CompositeStage<T> extends AbstractStage<T> implements Pipeline<T>
A stage that is composed of other stages. This allows a collection of stages to be grouped together and for that composition to the be referenced and reused.

Provides a simple implementation of the Pipeline interface.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private List<Stage<T>>
    Stages which compose this stage.
    private static final org.slf4j.Logger
    Class logger.
    private static final boolean
    Whether we are logging progress for all instances, regardless of their loggingProgress settings.
    private boolean
    Whether we are logging progress through the stages.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doExecute(List<Item<T>> items)
    Performs the stage processing on the given Item collection.
    protected void
     
    final List<Stage<T>>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Replaced by getStages().
    final List<Stage<T>>
    Gets an unmodifiable list of the stages that compose this stage.
    final boolean
    Returns whether we are logging progress.
    final void
    Deprecated, for removal: This API element is subject to removal in a future version.
    final void
    setLoggingProgress(boolean log)
    Sets whether we are logging progress.
    final void
    setStages(List<Stage<T>> stages)
    Sets the list of stages that compose this stage.

    Methods inherited from class net.shibboleth.metadata.pipeline.AbstractStage

    execute, getCollectionPredicate, setCollectionPredicate

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

    setId

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

    ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException

    Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

    checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitialized

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.shibboleth.shared.component.DestructableComponent

    destroy, isDestroyed

    Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

    getId

    Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

    initialize, isInitialized

    Methods inherited from interface net.shibboleth.metadata.pipeline.Pipeline

    execute
  • Field Details

    • LOG

      @Nonnull private static final org.slf4j.Logger LOG
      Class logger.
      Since:
      0.10.0
    • LOGGING_ALL_PROGRESS

      private static final boolean LOGGING_ALL_PROGRESS
      Whether we are logging progress for all instances, regardless of their loggingProgress settings.

      To enable this feature, define the system property net.shibboleth.metadata.loggingAllProgress to the token true.

    • composedStages

      @Nonnull @NonnullElements @Unmodifiable private List<Stage<T>> composedStages
      Stages which compose this stage.
    • loggingProgress

      private boolean loggingProgress
      Whether we are logging progress through the stages.

      Default value: false

      Since:
      0.10.0
  • Constructor Details

    • CompositeStage

      public CompositeStage()
  • Method Details

    • getStages

      @Nonnull @NonnullElements @Unmodifiable public final List<Stage<T>> getStages()
      Gets an unmodifiable list of the stages that compose this stage.
      Specified by:
      getStages in interface Pipeline<T>
      Returns:
      list the stages that compose this stage, never null nor containing null elements
      Since:
      0.10.0
    • setStages

      public final void setStages(@Nonnull @NonnullElements @Unmodifiable List<Stage<T>> stages)
      Sets the list of stages that compose this stage.
      Parameters:
      stages - list of the stages that compose this stage
      Since:
      0.10.0
    • getComposedStages

      @Deprecated(since="0.10.0", forRemoval=true) @Nonnull @NonnullElements @Unmodifiable public final List<Stage<T>> getComposedStages()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Replaced by getStages().
      Gets an unmodifiable list of the stages that compose this stage.
      Returns:
      list the stages that compose this stage, never null nor containing null elements
      See Also:
    • setComposedStages

      @Deprecated(since="0.10.0", forRemoval=true) public final void setComposedStages(@Nonnull @NonnullElements @Unmodifiable List<Stage<T>> stages)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the list of stages that compose this stage.
      Parameters:
      stages - list of the stages that compose this stage
      See Also:
    • isLoggingProgress

      public final boolean isLoggingProgress()
      Returns whether we are logging progress.
      Returns:
      true if we are logging progress
      Since:
      0.10.0
    • setLoggingProgress

      public final void setLoggingProgress(boolean log)
      Sets whether we are logging progress.
      Parameters:
      log - true to log progress
      Since:
      0.10.0
    • doExecute

      protected void doExecute(@Nonnull @NonnullElements List<Item<T>> items) throws StageProcessingException
      Description copied from class: AbstractStage
      Performs the stage processing on the given Item collection.

      The stage is guaranteed to be have been initialized and not destroyed when this is invoked.

      Specified by:
      doExecute in class AbstractStage<T>
      Parameters:
      items - collection to be processed
      Throws:
      StageProcessingException - thrown if there is an unrecoverable problem when processing the stage
    • doInitialize

      protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException
      Overrides:
      doInitialize in class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
      Throws:
      net.shibboleth.shared.component.ComponentInitializationException