net.shibboleth.metadata.pipeline
Class CompositeStage<ItemType extends Item<?>>

java.lang.Object
  extended by net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
      extended by net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
          extended by net.shibboleth.metadata.pipeline.CompositeStage<ItemType>
Type Parameters:
ItemType - type of Items this stage, and its composed stages, operate upon
All Implemented Interfaces:
Stage<ItemType>, net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.IdentifiableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent

@ThreadSafe
public class CompositeStage<ItemType extends Item<?>>
extends net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
implements Stage<ItemType>

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.


Field Summary
private  List<Stage<ItemType>> composedStages
          Stages which compose this stage.
 
Constructor Summary
CompositeStage()
           
 
Method Summary
protected  void doDestroy()
          
protected  void doInitialize()
          
 void execute(Collection<ItemType> itemCollection)
          Transforms the given input data.
 List<Stage<ItemType>> getComposedStages()
          Gets an unmodifiable list the stages that compose this stage.
 void setComposedStages(List<Stage<ItemType>> stages)
          Sets the list the stages that compose this stage.
 void setId(String componentId)
          
 
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
getId
 
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
destroy, 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.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
 
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiableComponent
getId
 
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
 

Field Detail

composedStages

private List<Stage<ItemType extends Item<?>>> composedStages
Stages which compose this stage.

Constructor Detail

CompositeStage

public CompositeStage()
Method Detail

setId

public void setId(String componentId)

Overrides:
setId in class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent

getComposedStages

@Nonnull
@NonnullElements
public List<Stage<ItemType>> getComposedStages()
Gets an unmodifiable list the stages that compose this stage.

Returns:
list the stages that compose this stage, never null nor containing null elements

setComposedStages

public void setComposedStages(@Nullable@NullableElements
                              List<Stage<ItemType>> stages)
Sets the list the stages that compose this stage.

Parameters:
stages - list the stages that compose this stage, may be null or contain null elements

execute

public void execute(@Nonnull@NonnullElements
                    Collection<ItemType> itemCollection)
             throws StageProcessingException
Transforms the given input data.

Specified by:
execute in interface Stage<ItemType extends Item<?>>
Parameters:
itemCollection - the data to be transformed
Throws:
StageProcessingException - thrown if there is a problem running this stage on the given input

doDestroy

protected void doDestroy()

Overrides:
doDestroy in class net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent

doInitialize

protected void doInitialize()
                     throws net.shibboleth.utilities.java.support.component.ComponentInitializationException

Overrides:
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
Throws:
net.shibboleth.utilities.java.support.component.ComponentInitializationException


Copyright © 1999-2012. All Rights Reserved.