net.shibboleth.metadata.pipeline
Class SimplePipeline<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.SimplePipeline<ItemType>
Type Parameters:
ItemType - the type of Item upon which this stage operates
All Implemented Interfaces:
Pipeline<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 SimplePipeline<ItemType extends Item<?>>
extends net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
implements Pipeline<ItemType>

A very simple implementation of Pipeline.


Field Summary
private  List<? extends Stage<ItemType>> pipelineStages
          Stages for this pipeline.
 
Constructor Summary
SimplePipeline()
           
 
Method Summary
protected  void doDestroy()
          
protected  void doInitialize()
          
 void execute(Collection<ItemType> itemCollection)
          Executes each registered Stage in turn.
 List<? extends Stage<ItemType>> getStages()
          Gets the list of Stages within the pipeline.
 void setId(String componentId)
          
 void setStages(List<? extends Stage<ItemType>> stages)
          Sets the stages that make up this pipeline.
 
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

pipelineStages

private List<? extends Stage<ItemType extends Item<?>>> pipelineStages
Stages for this pipeline.

Constructor Detail

SimplePipeline

public SimplePipeline()
Method Detail

setId

public void setId(@Nonnull@NotEmpty
                  String componentId)

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

getStages

@Nonnull
@NonnullElements
@Unmodifiable
public List<? extends Stage<ItemType>> getStages()
Gets the list of Stages within the pipeline.

Specified by:
getStages in interface Pipeline<ItemType extends Item<?>>
Returns:
unmodifiable list of stages within the pipeline

setStages

public void setStages(List<? extends Stage<ItemType>> stages)
Sets the stages that make up this pipeline.

Parameters:
stages - stages that make up this pipeline

execute

public void execute(@Nonnull@NonnullElements
                    Collection<ItemType> itemCollection)
             throws PipelineProcessingException
Executes each registered Stage in turn.

Specified by:
execute in interface Pipeline<ItemType extends Item<?>>
Parameters:
itemCollection - the collection that will hold the Item as it passes from stage to stage
Throws:
PipelineProcessingException - thrown if there is a problem processing the pipeline

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.