|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
net.shibboleth.metadata.pipeline.BaseStage<ItemType>
net.shibboleth.metadata.pipeline.SerializationStage<ItemType>
ItemType - type of items upon which this stage operates@ThreadSafe public class SerializationStage<ItemType extends Item<?>>
A stage which writes the given item collection out to a file.
This stage requires the following properties be set prior to initialization:
outputFileserializer
| Field Summary | |
|---|---|
private Logger |
log
Class logger. |
private File |
outputFile
File to which the item will be written. |
private boolean |
overwritingExistingOutputFile
Whether an existing output file should be overwritten. |
private ItemSerializer<ItemType> |
serializer
Serializer used to write the item to the output stream. |
| Constructor Summary | |
|---|---|
SerializationStage()
|
|
| Method Summary | |
|---|---|
protected void |
doDestroy()
|
protected void |
doExecute(Collection<ItemType> itemCollection)
Performs the stage processing on the given Item collection. |
protected void |
doInitialize()
|
File |
getOutputFile()
Gets the file to which the item will be written. |
ItemSerializer<ItemType> |
getSerializer()
Gets the serializer used to write item to the output file. |
boolean |
isOverwritingExistingOutputFile()
Gets whether an existing output file should be overwritten. |
void |
setOutputFile(File file)
Sets the file to which the item will be written. |
void |
setOverwritingExistingOutputFile(boolean isOverwriting)
Sets whether an existing output file should be overwritten. |
void |
setSerializer(ItemSerializer<ItemType> itemSerializer)
Sets the serializer used to write item to the output file. |
| Methods inherited from class net.shibboleth.metadata.pipeline.BaseStage |
|---|
execute, setId |
| 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 |
|---|
private final Logger log
private File outputFile
private boolean overwritingExistingOutputFile
true
private ItemSerializer<ItemType extends Item<?>> serializer
| Constructor Detail |
|---|
public SerializationStage()
| Method Detail |
|---|
@Nullable public File getOutputFile()
public void setOutputFile(@Nonnull
File file)
file - file to which the item will be writtenpublic boolean isOverwritingExistingOutputFile()
public void setOverwritingExistingOutputFile(boolean isOverwriting)
isOverwriting - whether an existing output file should be overwritten@Nullable public ItemSerializer<ItemType> getSerializer()
public void setSerializer(@Nonnull
ItemSerializer<ItemType> itemSerializer)
itemSerializer - serializer used to write item to the output file
protected void doExecute(@Nonnull@NonnullElements
Collection<ItemType> itemCollection)
throws StageProcessingException
The stage is guaranteed to be have been initialized and not destroyed when this is invoked.
doExecute in class BaseStage<ItemType extends Item<?>>itemCollection - collection to be processed
StageProcessingException - thrown if there is an unrecoverable problem when processing the stageprotected void doDestroy()
doDestroy in class net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
protected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||