|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.metadata.pipeline.AbstractComponent
net.shibboleth.metadata.pipeline.BaseStage<ItemType>
net.shibboleth.metadata.pipeline.PipelineDemultiplexerStage<ItemType>
ItemType - type of items upon which this stage operatespublic class PipelineDemultiplexerStage<ItemType extends Item<?>>
A stage which, given an item collection and a list of Pipeline and ItemSelectionStrategy pairs, sends
the collection of item copies selected by the selection strategy to the associated pipeline. This stage is similar to
SplitMergeStage but a given item, or more precisely a copy of it, may end up going to more than one
pipeline (or no pipeline).
This stage requires the following properties be set prior to initialization:
PipelineAndSelectionStrategies
If no ExecutorService is provided, one will be created using Executors.newFixedThreadPool(int) with 6
threads.
If no ItemCollectionFactory is given, then SimpleItemCollectionFactory is used.
| Field Summary | |
|---|---|
private ItemCollectionFactory<ItemType> |
collectionFactory
Factory used to create the Item collection that is then given to the pipelines. |
private ExecutorService |
executorService
Service used to execute the selected and/or non-selected item pipelines. |
private Logger |
log
Class logger. |
private List<org.opensaml.util.Pair<Pipeline<ItemType>,ItemSelectionStrategy<ItemType>>> |
pipelineAndStrategies
The pipelines through which items are sent and the selection strategy used for that pipeline. |
private boolean |
waitingForPipelines
Whether this child waits for all the invoked pipelines to complete before proceeding. |
| Constructor Summary | |
|---|---|
PipelineDemultiplexerStage()
|
|
| Method Summary | |
|---|---|
protected void |
doExecute(Collection<ItemType> itemCollection)
Performs the stage processing on the given Item collection. |
protected void |
doInitialize()
Do the initialization of the component. |
ItemCollectionFactory |
getCollectionFactory()
Gets the factory used to create the Item collection that is then given to the pipelines. |
ExecutorService |
getExecutorService()
Gets the executor service used to run the selected and non-selected item pipelines. |
List<org.opensaml.util.Pair<Pipeline<ItemType>,ItemSelectionStrategy<ItemType>>> |
getPipelineAndSelectionStrategies()
Gets the pipeline and item selection strategies used to demultiplex item collections within this stage. |
boolean |
isWaitingForPipelines()
Gets whether this child waits for all the invoked pipelines to complete before proceeding. |
void |
setCollectionFactory(ItemCollectionFactory<ItemType> factory)
Sets the factory used to create the Item collection that is then given to the pipelines. |
void |
setExecutorService(ExecutorService service)
Sets the executor service used to run the selected and non-selected item pipelines. |
void |
setPipelineAndSelectionStrategies(List<org.opensaml.util.Pair<Pipeline<ItemType>,ItemSelectionStrategy<ItemType>>> pass)
Sets the pipeline and item selection strategies used to demultiplex item collections within this stage. |
void |
setWaitingForPipelines(boolean isWaiting)
Sets whether this child waits for all the invoked pipelines to complete before proceeding. |
| Methods inherited from class net.shibboleth.metadata.pipeline.BaseStage |
|---|
execute |
| 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 |
|---|
private final Logger log
private ExecutorService executorService
private boolean waitingForPipelines
private ItemCollectionFactory<ItemType extends Item<?>> collectionFactory
private List<org.opensaml.util.Pair<Pipeline<ItemType extends Item<?>>,ItemSelectionStrategy<ItemType extends Item<?>>>> pipelineAndStrategies
| Constructor Detail |
|---|
public PipelineDemultiplexerStage()
| Method Detail |
|---|
public ExecutorService getExecutorService()
public void setExecutorService(ExecutorService service)
service - executor service used to run the selected and non-selected item pipelinespublic boolean isWaitingForPipelines()
public void setWaitingForPipelines(boolean isWaiting)
isWaiting - whether this child waits for all the invoked pipelines to complete before proceedingpublic ItemCollectionFactory getCollectionFactory()
public void setCollectionFactory(ItemCollectionFactory<ItemType> factory)
factory - factory used to create the Item collection that is then given to the pipelinespublic List<org.opensaml.util.Pair<Pipeline<ItemType>,ItemSelectionStrategy<ItemType>>> getPipelineAndSelectionStrategies()
public void setPipelineAndSelectionStrategies(List<org.opensaml.util.Pair<Pipeline<ItemType>,ItemSelectionStrategy<ItemType>>> pass)
pass - pipeline and item selection strategies used to demultiplex item collections within this stage
protected void doExecute(Collection<ItemType> itemCollection)
throws StageProcessingException
doExecute in class BaseStage<ItemType extends Item<?>>itemCollection - collection to be processed
StageProcessingException - thrown if there is an unrecoverable problem when processing the stage
protected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractComponentComponentInitializationException - throw if there is a problem initializing the component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||