net.shibboleth.metadata.dom.saml
Class SetCacheDurationStage

java.lang.Object
  extended by net.shibboleth.metadata.pipeline.AbstractComponent
      extended by net.shibboleth.metadata.pipeline.BaseStage<ItemType>
          extended by net.shibboleth.metadata.pipeline.BaseIteratingStage<DomElementItem>
              extended by net.shibboleth.metadata.dom.saml.SetCacheDurationStage
All Implemented Interfaces:
Component, Stage<DomElementItem>

public class SetCacheDurationStage
extends BaseIteratingStage<DomElementItem>

Sets a cacheDuration attribute for every EntityDescriptor and EntitiesDescriptor element in the collection.

This stage requires the following properties be set prior to initialization:


Field Summary
private  long cacheDuration
          Cache duration, in milliseconds, that will be set on each metadata element.
 
Constructor Summary
SetCacheDurationStage()
           
 
Method Summary
protected  boolean doExecute(DomElementItem item)
          Processes a given Item.
protected  void doInitialize()
          Do the initialization of the component.
 long getCacheDuration()
          Gets the cache duration, in milliseconds, that will be set on each metadata element.
 void setCacheDuration(long duration)
          Sets the cache duration, in milliseconds, that will be set on each metadata element.
 
Methods inherited from class net.shibboleth.metadata.pipeline.BaseIteratingStage
doExecute
 
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

cacheDuration

private long cacheDuration
Cache duration, in milliseconds, that will be set on each metadata element.

Constructor Detail

SetCacheDurationStage

public SetCacheDurationStage()
Method Detail

getCacheDuration

public long getCacheDuration()
Gets the cache duration, in milliseconds, that will be set on each metadata element.

Returns:
cache duration, in milliseconds

setCacheDuration

public void setCacheDuration(long duration)
Sets the cache duration, in milliseconds, that will be set on each metadata element.

Parameters:
duration - cache duration, in milliseconds

doExecute

protected boolean doExecute(DomElementItem item)
                     throws StageProcessingException
Processes a given Item.

Specified by:
doExecute in class BaseIteratingStage<DomElementItem>
Parameters:
item - Item on which to operate
Returns:
true if the Item should be retained in the collection, false if not
Throws:
StageProcessingException - thrown if there is a problem with the stage processing

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.