Class BasicSAMLArtifactMap
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.saml.common.binding.artifact.impl.BasicSAMLArtifactMap
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,SAMLArtifactMap
Basic artifact map implementation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classA cleanup task that relies on the weakly consistent iterator support in the map implementation.Nested classes/interfaces inherited from interface org.opensaml.saml.common.binding.artifact.SAMLArtifactMap
SAMLArtifactMap.SAMLArtifactMapEntry, SAMLArtifactMap.SAMLArtifactMapEntryFactory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DurationLifetime of an artifact.private Map<String,ExpiringSAMLArtifactMapEntry> Artifact mapping storage.private DurationTime between cleanup checks.private TimerTaskTask that cleans up expired records.private TimerTimer used to schedule cleanup tasks.Factory for SAMLArtifactMapEntry instances.private final org.slf4j.LoggerClass Logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected voidprotected voidGet the artifact entry lifetime.Get the map entry factory.voidput(String artifact, String relyingPartyId, String issuerId, SAMLObject samlMessage) voidvoidsetArtifactLifetime(Duration lifetime) Set the artifact entry lifetime.voidsetCleanupInterval(Duration interval) Set the cleanup interval, or 0 for none.voidSet the map entry factory.Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass Logger. -
artifactStore
Artifact mapping storage. -
artifactLifetime
Lifetime of an artifact. -
entryFactory
Factory for SAMLArtifactMapEntry instances. -
cleanupInterval
Time between cleanup checks. Default value: (5 mins) -
cleanupTaskTimer
Timer used to schedule cleanup tasks. -
cleanupTask
Task that cleans up expired records.
-
-
Constructor Details
-
BasicSAMLArtifactMap
public BasicSAMLArtifactMap()Constructor.
-
-
Method Details
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doDestroy
protected void doDestroy()- Overrides:
doDestroyin classAbstractInitializableComponent
-
getArtifactLifetime
Get the artifact entry lifetime.- Returns:
- the artifact entry lifetime
-
getEntryFactory
Get the map entry factory.- Returns:
- the map entry factory
-
setArtifactLifetime
Set the artifact entry lifetime.- Parameters:
lifetime- artifact entry lifetime
-
setCleanupInterval
Set the cleanup interval, or 0 for none.- Parameters:
interval- cleanup interval
-
setEntryFactory
Set the map entry factory.- Parameters:
factory- map entry factory
-
contains
- Specified by:
containsin interfaceSAMLArtifactMap- Throws:
IOException
-
get
@Nullable public SAMLArtifactMap.SAMLArtifactMapEntry get(@Nonnull @NotEmpty String artifact) throws IOException - Specified by:
getin interfaceSAMLArtifactMap- Throws:
IOException
-
put
public void put(@Nonnull @NotEmpty String artifact, @Nonnull @NotEmpty String relyingPartyId, @Nonnull @NotEmpty String issuerId, @Nonnull SAMLObject samlMessage) throws IOException - Specified by:
putin interfaceSAMLArtifactMap- Throws:
IOException
-
remove
- Specified by:
removein interfaceSAMLArtifactMap- Throws:
IOException
-