Package net.shibboleth.metadata.pipeline
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
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:
outputStrategyserializer
- Since:
- 0.9.2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface implemented by destination objects created by anMultiOutputSerializationStage.OutputStrategy.static interfaceInterface to be implemented by strategy object determining where an item should be written. -
Field Summary
FieldsModifier and TypeFieldDescriptionStrategy used to determine where to serialize the item.private ItemSerializer<T>Serializer used to write the collection to the output stream. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidProcesses a givenItem.protected voidGets the output strategy function determining where an item will be written.final ItemSerializer<T>Gets the serializer used to write item to the output file.voidSets the output strategy function determining where an item will be written.voidsetSerializer(ItemSerializer<T> itemSerializer) Sets the serializer used to write item to the output file.Methods inherited from class net.shibboleth.metadata.pipeline.AbstractIteratingStage
doExecuteMethods inherited from class net.shibboleth.metadata.pipeline.AbstractStage
execute, getCollectionPredicate, setCollectionPredicateMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
outputStrategy
Strategy used to determine where to serialize the item. -
serializer
Serializer used to write the collection to the output stream.
-
-
Constructor Details
-
MultiOutputSerializationStage
public MultiOutputSerializationStage()
-
-
Method Details
-
getOutputStrategy
Gets the output strategy function determining where an item will be written.- Returns:
- the output strategy function
-
setOutputStrategy
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
Gets the serializer used to write item to the output file.- Returns:
- serializer used to write item to the output file
-
setSerializer
Sets the serializer used to write item to the output file.- Parameters:
itemSerializer- serializer used to write item to the output file
-
doExecute
Description copied from class:AbstractIteratingStageProcesses a givenItem.- Specified by:
doExecutein classAbstractIteratingStage<T>- Parameters:
item-Itemon 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:
doInitializein classnet.shibboleth.shared.component.AbstractIdentifiedInitializableComponent- Throws:
net.shibboleth.shared.component.ComponentInitializationException
-