public class BasicSAMLArtifactMap extends net.shibboleth.utilities.java.support.component.AbstractInitializableComponent implements SAMLArtifactMap
Modifier and Type | Class and Description |
---|---|
protected class |
BasicSAMLArtifactMap.Cleanup
A cleanup task that relies on the weakly consistent iterator support in the map implementation.
|
SAMLArtifactMap.SAMLArtifactMapEntry, SAMLArtifactMap.SAMLArtifactMapEntryFactory
Modifier and Type | Field and Description |
---|---|
private long |
artifactLifetime
Lifetime of an artifact in milliseconds.
|
private Map<String,ExpiringSAMLArtifactMapEntry> |
artifactStore
Artifact mapping storage.
|
private long |
cleanupInterval
Number of seconds between cleanup checks.
|
private TimerTask |
cleanupTask
Task that cleans up expired records.
|
private Timer |
cleanupTaskTimer
Timer used to schedule cleanup tasks.
|
private SAMLArtifactMap.SAMLArtifactMapEntryFactory |
entryFactory
Factory for SAMLArtifactMapEntry instances.
|
private org.slf4j.Logger |
log
Class Logger.
|
Constructor and Description |
---|
BasicSAMLArtifactMap()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String artifact) |
protected void |
doDestroy() |
protected void |
doInitialize() |
SAMLArtifactMap.SAMLArtifactMapEntry |
get(String artifact) |
long |
getArtifactLifetime()
Get the artifact entry lifetime in milliseconds.
|
SAMLArtifactMap.SAMLArtifactMapEntryFactory |
getEntryFactory()
Get the map entry factory.
|
void |
put(String artifact,
String relyingPartyId,
String issuerId,
SAMLObject samlMessage) |
void |
remove(String artifact) |
void |
setArtifactLifetime(long lifetime)
Set the artifact entry lifetime in milliseconds.
|
void |
setCleanupInterval(long interval)
Set the cleanup interval in milliseconds, or 0 for none.
|
void |
setEntryFactory(SAMLArtifactMap.SAMLArtifactMapEntryFactory factory)
Set the map entry factory.
|
@Nonnull private final org.slf4j.Logger log
@NonnullAfterInit private Map<String,ExpiringSAMLArtifactMapEntry> artifactStore
@Duration @Positive private long artifactLifetime
@Nonnull private SAMLArtifactMap.SAMLArtifactMapEntryFactory entryFactory
@Duration @NonNegative private long cleanupInterval
@NonnullAfterInit private Timer cleanupTaskTimer
protected void doInitialize() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize
in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.ComponentInitializationException
protected void doDestroy()
doDestroy
in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
@Positive public long getArtifactLifetime()
@Nonnull public SAMLArtifactMap.SAMLArtifactMapEntryFactory getEntryFactory()
@Duration public void setArtifactLifetime(@Duration @Positive long lifetime)
lifetime
- artifact entry lifetime in milliseconds@Duration public void setCleanupInterval(@Duration @NonNegative long interval)
interval
- cleanup interval in millisecondspublic void setEntryFactory(@Nonnull SAMLArtifactMap.SAMLArtifactMapEntryFactory factory)
factory
- map entry factorypublic boolean contains(@Nonnull @NotEmpty String artifact) throws IOException
contains
in interface SAMLArtifactMap
IOException
@Nullable public SAMLArtifactMap.SAMLArtifactMapEntry get(@Nonnull @NotEmpty String artifact) throws IOException
get
in interface SAMLArtifactMap
IOException
public void put(@Nonnull @NotEmpty String artifact, @Nonnull @NotEmpty String relyingPartyId, @Nonnull @NotEmpty String issuerId, @Nonnull SAMLObject samlMessage) throws IOException
put
in interface SAMLArtifactMap
IOException
public void remove(@Nonnull @NotEmpty String artifact) throws IOException
remove
in interface SAMLArtifactMap
IOException
Copyright © 1999–2020 Shibboleth Consortium. All rights reserved.