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

java.lang.Object
  extended by net.shibboleth.metadata.pipeline.AbstractComponent
      extended by net.shibboleth.metadata.pipeline.SimplePipeline<ItemType>
Type Parameters:
ItemType - the type of Item upon which this stage operates
All Implemented Interfaces:
Component, Pipeline<ItemType>

@ThreadSafe
public class SimplePipeline<ItemType extends Item<?>>
extends AbstractComponent
implements Pipeline<ItemType>

A very simple implementation of Pipeline.


Field Summary
private  List<Stage<ItemType>> pipelineStages
          Stages for this pipeline.
 
Constructor Summary
SimplePipeline()
           
 
Method Summary
protected  void doInitialize()
          Do the initialization of the component.
 void execute(Collection<ItemType> itemCollection)
          Executes each registered Stage in turn.
 List<Stage<ItemType>> getStages()
          Gets the list of Stages within the pipeline.
 void setStages(List<Stage<ItemType>> stages)
          Sets the stages that make up this pipeline.
 
Methods inherited from class net.shibboleth.metadata.pipeline.AbstractComponent
equals, getId, getInitializationInstant, hashCode, initialize, isInitialized, setId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.shibboleth.metadata.pipeline.Component
getId, getInitializationInstant, initialize, isInitialized
 

Field Detail

pipelineStages

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

Constructor Detail

SimplePipeline

public SimplePipeline()
Method Detail

getStages

public List<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<Stage<ItemType>> stages)
Sets the stages that make up this pipeline.

Parameters:
stages - stages that make up this pipeline

execute

public void execute(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

doInitialize

protected void doInitialize()
                     throws ComponentInitializationException
Do the initialization of the component. Default implementation of this method is a no-op. Extending classes should override this method to perform any initialization logic necessary.

Overrides:
doInitialize in class AbstractComponent
Throws:
ComponentInitializationException - throw if there is a problem initializing the component


Copyright © 2009-2011. All Rights Reserved.