Class MultiOutputSerializationStage<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.AbstractIteratingStage<T>
net.shibboleth.metadata.pipeline.MultiOutputSerializationStage<T>
Type Parameters:
T - type of items upon which this stage operates
All Implemented Interfaces:
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

@ThreadSafe public class MultiOutputSerializationStage<T> extends AbstractIteratingStage<T>
A stage which writes the given item collection out to multiple destinations. The destination for each item is determined by a strategy function, and the serialisation is performed using a provided ItemSerializer.

This stage requires the following properties be set prior to initialization:

  • outputStrategy
  • serializer
Since:
0.9.2
  • Field Details

  • Constructor Details

    • MultiOutputSerializationStage

      public MultiOutputSerializationStage()
  • Method Details

    • getOutputStrategy

      @NonnullAfterInit public final MultiOutputSerializationStage.OutputStrategy<T> getOutputStrategy()
      Gets the output strategy function determining where an item will be written.
      Returns:
      the output strategy function
    • setOutputStrategy

      public void setOutputStrategy(@Nonnull MultiOutputSerializationStage.OutputStrategy<T> strategy)
      Sets the output strategy function determining where an item will be written.
      Parameters:
      strategy - output strategy function determining where an item will be written
    • getSerializer

      @NonnullAfterInit public final ItemSerializer<T> getSerializer()
      Gets the serializer used to write item to the output file.
      Returns:
      serializer used to write item to the output file
    • setSerializer

      public void setSerializer(@Nonnull ItemSerializer<T> itemSerializer)
      Sets the serializer used to write item to the output file.
      Parameters:
      itemSerializer - serializer used to write item to the output file
    • doExecute

      protected void doExecute(@Nonnull Item<T> item) throws StageProcessingException
      Description copied from class: AbstractIteratingStage
      Processes a given Item.
      Specified by:
      doExecute in class AbstractIteratingStage<T>
      Parameters:
      item - Item on which to operate
      Throws:
      StageProcessingException - thrown if there is a problem with the stage processing
    • 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